How to Rotate Player Pre-Collision?

In my game, the player will sometimes bounce off of a particular static object (let’s call it a “bumper”). I normally do not want the player’s physics body to rotate and have it set not to rotate. However, when the player collides with the bumper, I do want his body to rotate a set amount based upon the angle of incidence. Does anyone know how I can make this happen? I have tried to specifically change the player’s rotation either pre- or post- collision (player.rotation=45, for example), but it is not working (nothing happens). Any ideas? [import]uid: 76002 topic_id: 31860 reply_id: 331860[/import]

Try a print statement to see where the function is stopping and go from there. If nothing is happening then it’s never being called, or there is an error. If print doesn’t print then it’s never getting called, if it does then it is - either way you then have a starting point.

Share code/plug and play for slightly more insightful input :wink: [import]uid: 52491 topic_id: 31860 reply_id: 127156[/import]

Try a print statement to see where the function is stopping and go from there. If nothing is happening then it’s never being called, or there is an error. If print doesn’t print then it’s never getting called, if it does then it is - either way you then have a starting point.

Share code/plug and play for slightly more insightful input :wink: [import]uid: 52491 topic_id: 31860 reply_id: 127156[/import]