Ivanowski Posted April 13, 2017 Share Posted April 13, 2017 Hi, I'm creating a multiplayer game and I want to check if player moves, he collides with tilemap layer, but I need to check it before move, because I need to send this move on server. How can I do it? I really can't find help in docs... Link to comment Share on other sites More sharing options...
MikeW Posted April 13, 2017 Share Posted April 13, 2017 I am far from an expert here - but could you create a invisible sprite and move that to check. I am very interested if there is a better way. Link to comment Share on other sites More sharing options...
Ivanowski Posted April 14, 2017 Author Share Posted April 14, 2017 Thank you. I've created additional sprite that checks collision. I've changed P2 to Arcade physics. If the sprite position is different than player object, position in database updates. If database position (which is updating via websocket) is different, update player position. That's how I solve my problem :). Repo (Not commented yet): - State - Player object Link to comment Share on other sites More sharing options...
Recommended Posts