Nick_Rimer

[ARCADE physics] Incorrect velocity vector when trying to fly forward

Recommended Posts

Hello there!
I'm working with this example (asteroids movement): LINK

There is a strange behaviour that blows my brain out. It can be better seen on the attached video.
All I've done was a small rotation and then just pressed UP cursor key.

As you can see with the help of turned on debugger velocity vector rotates during fly until it reaches bottom-right corner of the bounding box. Also it force ship to fly wrong, it can be noticed even without debugger. Expected that velocity vector to be applied directly to where ship's nose is (or more correctly, ship have to move to the opposite side the engines work vector; see the picture).

What can be the solution of this problems? Seems velocityFromRotation() function works not as expected. Or there is something been lost.

Best regards,
Nick Rimer

Phaser 3 Examples - Google Chrome 2019-11-01 12.10.18 (1).png

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.