Jump to content

Rotate Sprite 90 degrees without changing angle for physics.arcade


OliverW
 Share

Recommended Posts

Hi,

my sprite is pointing to the top. But the angle = 0 means the it points to the right. So if i start moving, e.g. with

velocityFromAngle

the movement direction is default to the right, while the sprite is facing to the top. If i try to turn the sprit 90 degrees to the right, the angle for the movement also changes (the movement direction is then down). so the movement direction and the pointing direction of my sprite are never the same.

one way would be to change the sprite image. but i want to be flexible to move it in all 4 directions (90 degrees steps), depending on its random start postion. this has to be possible somehow. please help me

in other words

now: sprite is ^ and movement direction is >

if i change the angle then sprite is > but movement direction is v

what i want is the this:

Sprite > and movement direction >

or

Sprite ^ and movement direction ^

or

Sprite < and movement direction <

or

Sprite v and movement direction v

 

best regards

Oliver

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...