kriket Posted August 24, 2015 Share Posted August 24, 2015 I want my platform to move when the player lands on it but only in x-axis and not y-axis. Phaser has body.fixedRotation for locking rotation. Is there anything like that for one of the axis? I do not want to do this in the update function?body.velocity.x = 0; Link to comment Share on other sites More sharing options...
tips4design Posted August 24, 2015 Share Posted August 24, 2015 You want it to move from the collision momentum or you set the X speed manually? (and velocity.x = 0 and move only in x axis are conflicting in your question) Link to comment Share on other sites More sharing options...
kriket Posted August 25, 2015 Author Share Posted August 25, 2015 You want it to move from the collision momentum or you set the X speed manually? (and velocity.x = 0 and move only in x axis are conflicting in your question) collision momentum. So say when a player lands on it, the platform moves in down in y, until it reach the game bounds and get killed. Dont wont it to move in x from collision momentum, which is what he does when the player hit it by mistake from the side. Link to comment Share on other sites More sharing options...
drhayes Posted August 25, 2015 Share Posted August 25, 2015 I don't think Phaser has anything built-in that does what you want. It sounds like you're going to have to do custom processing in the processCallback and the collideCallback, maybe making use of customSeparateX/Y. Link to comment Share on other sites More sharing options...
Recommended Posts