dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.97k stars 248 forks source link

point of collision with HeightField #542

Closed politrons closed 8 months ago

politrons commented 11 months ago

In rapier2d having a collider with GenericHeightField. Inside we can have all heights, but there is any chance to know when I'm using collision detection, to which particular height my body collide?

Regards.

sebcrozet commented 8 months ago

Sorry for the late answer. If you are detecting collisions with the heightfield, I assume you will get contact points. The contact point position will give you the height of that collision. Closing now as the issue is a bit old, but feel free to reopen if this is still an open question.