Moving Platforms: Physics improvement

TosanuTosanu Member, PRO Posts: 388

I feel like i should have been able to solve this on my own, but I've never been able to put it together in weeks of thought, so I'm tossing it out to the board.

Is there a way to make moving platforms that impart their momentum on the player without making it impossible for them to move? All methods i know dont affect the player, just moving underneath them, or freeze them in place with a constrained movement.

First, a quick block. My characters work on a simple control scheme. Since i have more than one character choice, i created a standardized movement block. When the Boolean Left Button or Right Button is tripped by button push, the player's Velocity is constrained to their self.movespeed or -self.movespeed attributes. They collide with the ground by lieu of a series of collision boxes that detect when theyre touching the gruond, or against a wall on the left or right, as well as simple collision with Tag:Ground objects. So is there a way to somehow capture the momentum of a moving platform and apply it to a player as well when they colliding? (it would be hard to dig out the self.movespeed attribute and replace it with a global type, so im considering any action that uses that a last resort.)

Best Answers

  • ookami007ookami007 Posts: 581
    edited August 2014 Accepted Answer

    Jamie Cross's videos show you how to keep a player on the platform by using offset attributes - offsetX,offsetY that are utilized by the player actor when colliding with a platform.

    It works... I do it in my own platformer.

  • ookami007ookami007 Posts: 581
    Accepted Answer

    Yes... you can move and jump while on the platform - at least, if you follow his instructions.

Answers

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Have you tried some Jamie Cross videos on Youtube?

  • TosanuTosanu Member, PRO Posts: 388

    Yes, I modeled the start of my platforming on his, but as i recall, his moving platforms freeze the player in place until jumping. Did i miss something? In any cse, i need to model it based on the system i have put together now.

  • TosanuTosanu Member, PRO Posts: 388

    I'll have to watch the video shortly, but I must ask. you can move normally while on the platform?

  • TosanuTosanu Member, PRO Posts: 388

    I hope that i didnt go to ofar into a system that doesnt allow that, then. Ill have to watch it more closely.

  • ookami007ookami007 Member Posts: 581

    It should, because that's what I used as my base and my player will move with the platform but can also move/jump on the platform. I've tried it with vertical and horizontal platforms.

  • TosanuTosanu Member, PRO Posts: 388

    Its more that i made such a specific character movement model that im worried it wont fit with this, and ill need time to study the tutorial since i cant just now.

  • TosanuTosanu Member, PRO Posts: 388

    Ok, its definitely a different style of movement, but i THINK i can make it work. Now, that does leave one other question. This is for simple left right and up down movement. TO put it simply, im trying to create a ferris wheel, where you can jump on the "cars". since i normally would create that with a positional constraint based on cos/sin, can i create an offset in the same fashion? ( i've determined that since i track the player positions, i can use the ELEVATORS to create offset whenever they are in contact with the player, and simply use the keypresses to override the constrain)

  • ookami007ookami007 Member Posts: 581

    Honestly... it doesn't matter which direction you are moving with the platform... I had one moving diagonally along a "track". Tracking the offset's the important thing and applying it correctly. Remember... once they jump or walk off a platform... they're no longer subject to it's movement.

  • TosanuTosanu Member, PRO Posts: 388

    So basicaly, its the X/y position of the platform that sets it up. Ok, that should work. I should be able to graft it in place, then

Sign In or Register to comment.