PicoFoundry Posted June 24, 2015 Report Share Posted June 24, 2015 I am new to Phaser, so definitely a ton I do not know. I was experimenting with it by working on a little game where a player jumps from one platform to another, based on where the user clicks. I did this by setting the velocity of the player's body. However, once it lands on the other platform it just keeps sliding. I looked into the documentation and found a Friction property in Arcade.Body but I am not sure how to use it. I looks like it should be applied to the platform the player lands on, but it seems to require a point, and I have not been able to find an example using it. I did implement a custom friction method using the collisionCallback used by the collide method, that reduces the x velocity incrementally to 0 and results in this behaviour: http://gfycat.com/ZigzagBrownHoopoe Which seems to work fine, but if there is a built in way to set it, I would prefer to use that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.