rapier icon indicating copy to clipboard operation
rapier copied to clipboard

Support top-down 2-D movement in character controller

Open ndarilek opened this issue 2 years ago • 3 comments

I'd like to set up a character controller for a top-down 2-D game. There would be no up vector. The controller would focus on maintaining separation between the character and walls, and possibly sliding along wall angles.

I'm not immediately sure how the existing support could be made to work with this. If I wanted a character to slide along walls, it seems like I could fake it in some circumstances. But then the character might get stuck if attempting to slide along a wall perpendicular to the unused up vector, resulting in slides in some situations but not others. Maybe that's inaccurate but it seems like it'd be true.

Thanks.

ndarilek avatar Jan 30 '23 15:01 ndarilek

In a 2D game, isn't Up just the 3rd axis - pointing toward the 'camera'? For example, if your 2d objects are laid out along the X and Y axes, up would be (0,0,1). If everything is on a flat 2d plane, you'd never have a wall that was perpendicular to the Z axis (that would be a ceiling, technically).

a-type avatar Feb 06 '23 18:02 a-type

Sure, but you can't specify a Vec3 as an up vector nor can you specify ZERO or None.

ndarilek avatar Feb 06 '23 20:02 ndarilek

Is there any progress / plans for this?

AndriBaal avatar Feb 16 '24 10:02 AndriBaal