Jump to content

Trigger Collisions


SpiderPig
 Share

Recommended Posts

What I have at the moment is the terrain triangles surrounding the player are created from a polymesh (in red).  If I set the collision between the terrain shape and the player shape to collide it calls the Collison() callback, but if I set it too trigger it falls straight through without triggering it.  The box (in green) is also a trigger an it works flawlessly.

Does a trigger shape need to be a volume rather than a group of thin polys?

PhysicsScreenshot.thumb.png.ce8464499511b0d2c2b55119889db48d.png

 

A bit of info on what I'm doing;

I am applying a force to the player's shape to simulate gravity, when a collision on the terrain is detected it stops the velocity and keeps the entity at that position until moved by the player.  To find the position the player should move too, I get the collision normal, create a plane, and find a position on that plane a little further forward (or backward) then use PhysicSetPosition() to move it there.  The problem with the collision set to collide is the player drags across the surface and causes jittering.  I need to be able to detect the collision without the physics system actually doing anything.  I.e. A trigger.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...