Jump to content

Setting gravity to only one sprite/body?


Recommended Posts

I have a player sprite, and a platform sprite..


I want the player to be affected by gravity, but not the platform.


Here's the code that I have now..

game.physics.arcade.gravity.y = 500;

But is there a way to set it so it's just player affected by it?


Something like this?

player.gravity = 500;
Link to comment
Share on other sites

This topic is now closed to further replies.

  • Recently Browsing   0 members

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