Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Setting gravity to only one sprite/body?


Jessicaward25
 Share

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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