Jump to content

[SOLVED] Local collision detection using Triggers


photo

Recommended Posts

Hi,

 

I was trying to do a simple detection of collision objects right in front of my walking AI to make it move aside.

 

I added a child WorldTrigger/PhysicalTrigger to the AI such that it covers AI's front side, which seems perfect for my purpose but they are doing callbacks on bounding box intrusion, not surfaces. Another approach was using engine.world.getCollisionObjects() but that was detecting terrain, sky object etc in the level (maybe its doing bounding box checks too?). If using engine.world.getIntersection() rays, I might need to do many checks (knee, torso and head, on both left and right side) for accurate reading.

 

I prefer using a Trigger but is there a way to make them detect the presence of object surfaces rather than bounding box? Thanks.

Link to comment

Thanks Andrey, I guess my use of PhysicalTrigger was incorrect. Meanwhile I implemented the collision check using 4 intersection rays, 2 horizontal rays from knee height and 2 rays upwards from where horizontals ended. You can consider this issue closed, thanks again.

Link to comment
×
×
  • Create New...