Jump to content

How to make sprite move in the direction it's facing?


Laumark
 Share

Recommended Posts

Nope, pixi just draws stuff really really fast! Actually it does interactive stuff too but thats by-and-by.

I can vouch for P2 and also matterJS, both allow any rendering front-end to be bolted on (not all physics libraries do, some like to be tied to the rendering, which, in my opinion is plain wrong, do one thing well), in my experience P2 was easier to integrate, its a very powerful package. Both libraries have a pixi example in their source repos.

You should be able to find examples of bolting either physics lib and pixi together, or if you know phaser then phaser packages P2 if you dont mind using slightly older versions.

If you want to roll your own though, a simplified physics library just to help you move stuff around, its not too difficult (if you know your maths a bit) and a good exercise. The physics only gets hard when you want a fairly realistic simulation, stuff like collisions and everything can get hairy, just moving around isn't too difficult.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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