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 :)
This commit is contained in:
Erwin Coumans
2005-08-05 17:00:32 +00:00
parent 0f044af97e
commit b6d9fbf0db
17 changed files with 303 additions and 114 deletions

View File

@@ -106,10 +106,13 @@ bool KX_RaySensor::IsPositiveTrigger()
bool KX_RaySensor::RayHit(KX_ClientObjectInfo* info, MT_Point3& hit_point, MT_Vector3& hit_normal, void* const data)
{
printf("KX_RaySensor::RayHit\n");
KX_GameObject* obj = (KX_GameObject*)GetParent();
SCA_IObject *hitgameobj = info->m_gameobject;
if (hitgameobj == obj || info->m_type > KX_ClientObjectInfo::ACTOR)
{
printf("false hit\n");
// false hit
return false;
}