Platforms moving at angles + Platform Behavior = Weird Jump

For questions about using Classic.

Post » Mon Feb 22, 2010 11:23 pm

[quote="deadeye":2j92zw4y]
Yes but it's been added as a fix to keep the player squarely on moving platforms. [/quote:2j92zw4y]

yea but were talking about momentum transfered to the jump here, not the repositioning of the sprite.
if im right the platform movement saves the x,y coords of the object relative to what its standing on checks to see if the solid object its standing on has changed position, and then moves it according to the coords saved before. when you jump, i assume that the rate of change (movement speed) of the objects position is saved aswell and added to the vectorx and vectory of the platform, but the "bug" were seeing now wasnt thought of.

repositioning it is 100% fine its the best way to do it, but when you jump momentum transfer would only occur for upwards or horizontal movements. something like a check to see if the rate of change (vertical movement vector in our case) is a positive (downwards) value to negate the vertical momentum transfer is all thats needed, but little things like this are always neglected because thats just the nature of obscure bugs, they don't appear until something played with in weird ways.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Tue Feb 23, 2010 7:18 pm

What I did in 2.5d concept was:

if the player is standing on a platform, set player velocity to platform. After that, do the normal movement stuff.

This means if you jump off a platform, you'll carry momentum. All momentum is lost when touching the ground (which is kind of normal for a platform game, though you might want to do some other calculation instead)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests