Overriding Humanoid's self-uprighting (gyroscopic) behavior

I’m trying to write a game where players can temporarily walk on walls (provided a normal Vector3), and I have already handled everything else from gravity simulation to camera rotation, but Humanoids always trying to rotate to global upwards is stumping my best efforts to avoid writing a fully custom Humanoid.

Trying to set RotVelocity and CFrame every frame is only partially successful, I can get them to momentarily face the desired angle but Humanoids still try to bob upwards and cause irritating angular jittering.

I am aware that there are open resources out there for wall walking, but I don’t need entire planetary gravity systems or walking on ceilings at the moment. Just need a small fixer for the work I already have completed so far, if one exists.

Is there a way to override a Humanoid’s persistent self-uprighting or do I have to hack in more custom behavior? I’m not super interested in writing an entire custom Humanoid because I want to retain as much of the natural Roblox character as possible. The best I can do from here is set Humanoids’ state type to Physics and somehow rewrite all movement controls for temporary use, but I can’t even seem to find any documentation of the inner workings of the Humanoid control system.

I would make a feature request to bypass this if I had any faith that Roblox would think it necessary for most games. Frankly, I feel Humanoid behavior is still terribly uncontrollable in general. I wish there was at least a state type that disabled this but still allowed for movement.

3 Likes

I will refer you to this thread, if you’re able to access it:
https://devforum.roblox.com/t/walking-on-walls-ceiling/51831/10
This might not be referring to the uprighting behaviour exactly, but I think it’s related since this thread is all about wall-walking with humanoids.

I’ve only seen this done in a custom character module here:

1 Like

I was afraid this was still the case.

This means either having to implement a custom character controller ( :heavy_check_mark::question: ), gravity ( :heavy_check_mark: ), and animation system ( :unamused: ) from scratch […]

I can try my best to mimic Roblox’s native controls and I’ve already dealt with all the gravity, but I absolutely hate having to deal with animation systems. I trust I can at least hijack the default one into working with a more customized controller, thankfully animations still play with the Physics humanoid state type.

Or, you can take @Klocko’s approach and have the player control an off-screen upright humanoid who is confined to a baseplate and whose movements are copied onto a copy of your character, with an additional orientation transform. Smooth surface-to-surface transitions are a difficult problem to solve in either case.

Not a bad idea, but with a few curves going on in my game I’m not exactly sure how I’d manage this trick any better.

There is a such thing as a AnimationController object - which is now recommended moving forward, as using the Humanoid method is considered deprecated.

Same API as the Humanoid.

1 Like