Jump to content

mass and density on box2d


ThePhyxius
 Share

Recommended Posts

Hi people,

I have just started with phaser last week and I think it is a great tool to develop html games. One of the problems that I have is that sometimes the examples on the website are not enough for me and the API and documentation don't cover much of Box2d (as far as I can see this last days).

In my scene I have two planets and a player that is moved by keyboard. All box2d bodies.

Currently, if the player collides with a planet, both the player and the planet will get velocity from the collision.

What i want to achieve is that the planets dont get moved by a collision with a player but get moved if they collide with each other.

is there a way to set a mass so high to the planets that a collision with the player does not affect them?

 

Thank you

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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