Jump to content

Moving platform oddness..


Recommended Posts

Hey good people of the html5gamedev world. I've created a simple moving platform using a tween but the player's interaction with the platform is a little off. The screencast sums it up. Basically, I would expect my character to fall down when the platform is no longer under them? I'm sure I'm making some newbie mistake here. Any suggestions? I can post the code if need be. 


Link to comment
Share on other sites

Thanks for the reply. Nice, I didn't know there was a debug mode. I'm still very new to this. The blue box, (I guess it's a collider outline?) is not moving with the platform. Here's the code I'm using to create the platform and the tween. 

//this.myMovingPlatforms was returned from earlier call to this.physics.add.staticGroup();
this.myMovingPlatforms.create(48*8, 48*5, 'movingGround').refreshBody();
targets: this.myMovingPlatforms.getChildren()[0],
x: '+=48',
ease: 'Power1',
duration: 3000,
yoyo: true,
repeat: -1

Anything fundamental I'm missing here?  



Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...