#is there a better way to align my movement vector to the floor?

7 messages · Page 1 of 1 (latest)

fiery rover
#

i want to make my character move along the floor like in mario, in that they smoothly go up and down slopes, ive been using get_floor_angle and rotating the movement vector, but it doesnt seem to work for the left side
what's the proper/ better way to do this?

#

the red line shows the direction of the movement vector after it is rotated by get floor angle

lethal eagle
#

for a start, maybe you'd want to do floor collisions a bit like on this page, so that the centre of your character is used for slope detection

#

this stops your character poking out a lot while on a slope

#

then maybe i'd use a state machine to make sure I can stick to the slope if there's ground directly beneath me - if I'm in the ground state, and I'm suddenly airborne, I'd check beneath my character for ground and then snap to it

fiery rover
#

this is gamemaker?