Detecting direction of a surface normal?

I need to test if my player character is standing on the ground, bumping into a wall or bumping his head on the ceiling. One way to do this would be to check the direction of the edge normals on the physics object(s) the player is colliding with.

Apparently this is built into Box2D, but I don’t see anything like that exposed in the Corona API.

Any suggestions on how to do this? [import]uid: 48658 topic_id: 10536 reply_id: 310536[/import]

Any thoughts on this? [import]uid: 48658 topic_id: 10536 reply_id: 38721[/import]

This would be really useful for me as well. I’ve tried to find a way but have been unsuccessful. [import]uid: 49205 topic_id: 10536 reply_id: 38726[/import]

Set a value called ‘class’ or some such on each object. Use it to name/identify your objects. In the collision handler just test for the identifier.

You can always put a sensor at the top and bottom of your character if you want specific checking. [import]uid: 8271 topic_id: 10536 reply_id: 38769[/import]