How do I limit Y movement with physics behavior?

Get help using Construct 2

Post » Wed Mar 11, 2015 2:38 pm

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.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 51
Reputation: 525

Post » Wed Mar 11, 2015 4:50 pm

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.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Wed Mar 11, 2015 5:12 pm

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.
B
6
S
1
Posts: 51
Reputation: 525

Post » Thu Mar 12, 2015 2:53 am

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.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Thu Mar 12, 2015 11:18 am

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.
B
6
S
1
Posts: 51
Reputation: 525

Post » Thu Mar 12, 2015 3:12 pm

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.
B
6
S
1
Posts: 51
Reputation: 525


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests