Jump to content

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


Nick_Rimer
 Share

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

Link to comment
Share on other sites

  • Nick_Rimer changed the title to [ARCADE physics] Incorrect velocity vector when trying to fly forward
 Share

  • Recently Browsing   0 members

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