OliverW

Rotate Sprite 90 degrees without changing angle for physics.arcade

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.