Bounce on moving platform

jon2sjon2s Member Posts: 40
edited November -1 in Tech Support
I have a setup where there are stationary cloud platforms and they work all the time (jump through, land on top bounce up). Did this by checking if the moving actor is going up or down. If down, colide.

I also have a moving cloud platform, it works sometimes. How I have it moving is by checking if it's self positionx < 30 then change velocity -> speed 50. There is another rule checking if self positionx > 290, then change velocity <- speed 50. It moves back and forth just perfectly, but about 40% of the time the actor that moves through it misses it completely.

Anyone have any ideas?

Thanks,

Jon

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    the fact that the game engine has to constantly check the platform's x position might be the problem. To see if that is the issue just have the platform move in one direction with x wrap turned on. So the platform will keep moving across the screen over and over. See if the jumping becomes more accurate.

    Another tip that may or may not be related- I am assuming you have a rule that says when self.linear.Y is < 0 and collides with MovingCloud then accelerate 90 to scene...

    Try this. Same rules but instead of the accel behavior have a boolean attribute (jump) and use a change attribute behavior that changes it to true. Then have a second rule that says when jump is true accelerate 90 to scene (wrapped in a timer of course (set to run to completion). Make sure both the jumper and the platform's restitution is 0. Also in the when jump is true rule have a second timer set to "after" 0.1 change jump to 0.
Sign In or Register to comment.