Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by moon

Hi everybody !

I'm new here ... i'll try to explain my problem

On my game i put a slope, i just want my "player" rotate of 45° when he walk on this slope.

Thanks for your help :)

1 decade ago by paulh

http://impactjs.com/forums/help/how-to-rotate-an-entity

then check against the tile your looking for to perform the rotation .. would write some code for you, but i suck!

1 decade ago by Jerczu

In a handlemovementtrace you can check the angle of the tile you are currently colliding with this is in radians as far as I remember. All you need to do then is rotate your entity by this angle.

There are helper functions deg to rad and reverse.
Page 1 of 1
« first « previous next › last »