[Custom Mvmnt] Ground collision help

For questions about using Classic.

Post » Fri Feb 04, 2011 6:11 am

I'm making a Mario game with custom movement, and I've run into an issue with landing. This is a small problem, but a bothersome one: I have it so that when he overlaps the ground at an offset of one pixel above, it sets his vertical speed to zero, but he almost always ends up one or two pixels into the ground. :roll:

It's never constant, though, so I can't just fudge the collision offset until it works. Obviously, I need a better way of telling when he lands and how to keep him even with the ground, but how?

.cap: http://dl.dropbox.com/u/19702035/mariosonic4.cap

EDIT: New question from a few posts down: is there any problem with using a combination of Platform behavior and Custom movement? All this jumping and landing stuff would be taken care of by the Platform behavior, but I'd make everything else -- speed/acceleration and whatnot -- custom. Would that work out if I did it right?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Fri Feb 04, 2011 2:08 pm

Couldn't get the event sheet to load for some reason. Crashed every time.

So without actually looking at it I suggest updating the collision mask, and suggest that its a frame rate issue.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Feb 04, 2011 6:03 pm

Really? Weird, that's the only thing that HASN'T been giving me problems. :P Try it again, I uploaded a slightly newer version(same URL).

Now I've figured out a way that makes sure he always lands evenly with the ground, but it only works for the ground, not platforms -- there's no mystery why, but I can't come up with anything else.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Fri Feb 04, 2011 7:24 pm

Oh, and I just thought of a somewhat related question that I might as well ask here: is there any problem with using a combination of Platform behavior and Custom movement? All this jumping and landing stuff would be taken care of by the Platform behavior, but I'd make everything else -- speed/acceleration and whatnot -- custom. Would that work out if I did it right?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests