diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2005-08-05 21:00:32 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2005-08-05 21:00:32 +0400 |
commit | b6d9fbf0dbe44efee9309f09bc1a518a2cd67813 (patch) | |
tree | 43aaf1f693bec9849914001b9cf1fd1dce185de1 /source/gameengine/Ketsji/KX_RayCast.cpp | |
parent | 0f044af97ef785f73e0aa2188716dcafd0c0d54e (diff) |
fixed the mouse-over sensor,
added raycast support for bullet (no triangle-mesh support, soon)
added python methods for 'getHitObject', getRayDirection, getHitPosition and getHitNormal for mouse over sensor,
which makes it easy for a shootout.blend demo :)
Diffstat (limited to 'source/gameengine/Ketsji/KX_RayCast.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_RayCast.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp index fa8a04c0780..7b13cb1fd7d 100644 --- a/source/gameengine/Ketsji/KX_RayCast.cpp +++ b/source/gameengine/Ketsji/KX_RayCast.cpp @@ -69,13 +69,15 @@ bool KX_RayCast::RayTest(KX_IPhysicsController* ignore_controller, PHY_IPhysicsE if (!info) { + printf("no info!\n"); MT_assert(info && "Physics controller with no client object info"); return false; } if (callback.RayHit(info, result_point, result_normal)) return true; - + + // skip past the object and keep tracing /* We add 0.01 of fudge, so that if the margin && radius == 0., we don't endless loop. */ MT_Scalar marg = 0.01 + hit_controller->GetMargin(); |