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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user