How do I limit Y movement with physics behavior?

0 favourites
  • 6 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • Hey there , i'm making a platform game and i am attempting to create a set of movement rules using the physics behavior that is essentially similar rules to that of a sonic game , i'm trying to create a system where the players movement will follow the geometry of the platforms using collision polygons , however in doing so it means that the speed built up by the player means they usually end up just flying upwards into the sky rather than following the platform. ( an example of what kind of platform i'm talking about will be picture 1).

    i have tried limiting gravity and friction but those only end up destroying the flow of movement , the collision system i have in place ( picture 2) works fine and allows the player to use these platforms without issue but i need a way to keep to them attached to these platforms regardless of speed without taking off and still being allowing the player to jump.

    i apologize if this is confusing and i thank you for your time,Ryan.

  • An interesting problem.... My instinct is to take the magnitude of the cross product of the player's velocity and the surface normal and apply it reverse of the surface normal.... but I have no idea how to get that surface normal from a sprite.

    Edit: Maybe do something like Airscape, where you use overlapping invisible sprites to define the surface normal, and lerp when overlapping multiple sprites.

  • do you know if they're are any examples of what you've suggested in your edit hear on the forums or any where else , i understand most of what you described just prefer to look something over , and once again thank you very much.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I can't seem to find it right now, but I think there was a forum post about how Airscape: The Fall of Gravity was done somewhere on the forums. You wouldn't want a constant "down"ward force like Airscape though, you would probably want the "gravity" force to be proportional to speed.

  • https://www.scirra.com/tutorials/273/ho ... platformer So I've been trying this , which seems like what you've recommended but it doesn't seem to work with my set up since im not using the player behaviour.

  • tried this by using the physics behaviour but do sent seem to work or i can't figure it out if any one has any suggestions i would appreciate it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)