Make Actor Stand on Moving Platform?

NtGNtG Member Posts: 103
edited April 2012 in Working with GS (Mac)
I have two different platforms made (one that moves horizontally and the other vertically). They both are non-movable and use interpolate to move. How can I get my character to be able to stay on the platform when they move? Right now the horizontal platform just slides out from underneath the main character and the character falls, and when I stand on the vertical platform and it starts to go down, my actor falls at a slower rate than the platform moves downward. I know someone out there has working platforms...

Answers

  • SAZ_1SAZ_1 Member Posts: 397
    is the character allowed to move while the platform is moving??.. maybe constrain x pos to platform x pos when platform is moving, plus try using somthing other then interpolate
  • NtGNtG Member Posts: 103
    I would like the character to be able to move, and I really dont think anything else will work besides interpolate.
  • NtGNtG Member Posts: 103
    edited April 2012
    link not working?

    EDIT NVM
  • NtGNtG Member Posts: 103
    Well, that solves the horizontal platform, but what about the vertical platform?
  • NtGNtG Member Posts: 103
    I know he should, but the platform moves faster than the gravity pushes him down, so when the platform is going down you get that jumping in an elevator effect where he just floats slightly above the platform until it comes to a rest at the bottom. Also he can't move side to side while standing on the vertical platform for some reason.
  • NtGNtG Member Posts: 103
    edited April 2012
    Hey TSB, I am running into a problem implementing that coding into my game. My game uses touch to have the character move and the movement is not working while standing on the platform (can't go left and right), but the character stands still perfectly fine.

    I replaced the following:
    "When keyboard 'left' is down" with "When touchX > self.positionX"
    and also:
    "When keyboard 'right' is down" with "When touchX > self.positionX"

    besides those two changes everything else is the same, but the actor won't "walk" left and right while standing on the platform (works fine on the ground still)? Any ideas?

    edit: well, I actually did more than that in that I have "change self.motion.linear velocity x to 0" if touch is not pressed. causing the character to stop when I release the touch. But I tried to replace just the same code in your project as I wrote above, and the character does not walk when it should on the platform.
Sign In or Register to comment.