ageibert Posted November 25, 2014 Share Posted November 25, 2014 i hope i didn't overlook a forum thread but:is it possible to move a sprite/entity only by its x and y value, not using body.velocity, and still getting arcade collision to work? best regards Link to comment Share on other sites More sharing options...
ageibert Posted November 26, 2014 Author Share Posted November 26, 2014 my problem is that moving the player by velocity results in a feeling of sliding on ice (in my top down game). i want it more like normal walking, but still preserve the collision detection. Link to comment Share on other sites More sharing options...
lewster32 Posted November 26, 2014 Share Posted November 26, 2014 You can mitigate the 'sliding' by either zeroing the velocity when the player isn't holding a direction, or setting the body.drag.x and .y values to something very high. Otherwise collisions will not be properly calculated, as velocity is used within the collision calculation. You can try setting body.moves = false and then move the character manually and hope the separation routine doesn't go too crazy - it's definitely worth trying in your particular scenario. Link to comment Share on other sites More sharing options...
ageibert Posted November 26, 2014 Author Share Posted November 26, 2014 i've chosen the body.drag solution and tweaked it with setting the speed (velocity increment) accordingly.additionally i set the maximumVelocity, so that the player doesn't accelerate too much. now my player still slides a bit, but that's ok for me. Thank you for that! Link to comment Share on other sites More sharing options...
Recommended Posts