aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/lua_api/load_phys.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/lua_api/load_phys.cpp b/src/shared/lua_api/load_phys.cpp
index a03c404..fca5d47 100644
--- a/src/shared/lua_api/load_phys.cpp
+++ b/src/shared/lua_api/load_phys.cpp
@@ -35,9 +35,7 @@ int shapecast(lua_State *L){
hw = cb->m_hitPointWorld;
//Okay, turns out m_hitNormalWorld is not the normal of either of the shapes (although it's usually close):
//https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=3538
- //Not only is it not a normal of either of the shapes or the collision, it's not even a normalized vector, I got it's magnitude as low as 0.90 and as high as 1.11 in testing.
- //So we have to normalize it once it comes out.
- hn = cb->m_hitNormalWorld.normalized();
+ hn = cb->m_hitNormalWorld;
//printf("Got sweep results\n\tHasHit:%d\n\tHit:%f,%f,%f\n\tNor:%f,%f,%f\n",cb->hasHit() ? 1 : 0,hw.x(),hw.y(),hw.z(),hn.x(),hn.y(),hn.z());
lua_newtable(L);//{}
lua_pushboolean(L,cb->hasHit() ? 1 : 0);