sammae Posted November 5, 2018 Share Posted November 5, 2018 Hi, I've been stumped by this for quite awhile and I feel as if it's so simple. I'm simply trying to create a platform that moves back and forth that a player can jump on. I got a platform to move by doing something like this: platform = this.physics.add.sprite(300, 100, 'form'); platform.body.allowGravity = false; platform.body.immovable = true; platform.body.velocity.x = 100; But it just keeps moving in one direction and I can't figure out how to make it collide with the player. I tried the: this.physics.add.collider(this.player, platform); But that did not work. I just want a simple platform that moves back and forth that the player can jump on. Please any help is greatly appreciated, I'm ready to pull my hair out over this. ? Link to comment Share on other sites More sharing options...
samme Posted November 6, 2018 Share Posted November 6, 2018 https://codepen.io/samme/pen/wYLQOY OneSillyLion, sammae and tihoho 2 1 Link to comment Share on other sites More sharing options...
sammae Posted November 7, 2018 Author Share Posted November 7, 2018 On 11/5/2018 at 11:05 PM, samme said: https://codepen.io/samme/pen/wYLQOY This worked like a charm!!! Thank you so much! I hadn't seen the tweens thing until this, so that was super helpful. Thank you thank you! Link to comment Share on other sites More sharing options...
Recommended Posts