New Humanoid Physics Controller - Beta

This all seems really good. I am sorta interested though, is it possible or is there plans to give us control over the Humanoid’s gyro? Aka allowing us to do wall-walking and such without the complexity of current solutions.

4 Likes

Glad the Humanoid is being introduced with updates like these, this is going to allow for flexibility and numerous ways of creating custom character controllers with ease whilst being performance-safe

I played around with it and I absolutely love it. As an extra bonus, it goes really well with the new strafing animations

5 Likes

Please tell me this makes climbing more consistent! As the owner of a game where you’re climbing a significant amount of time, I’ve noticed some extreme inconsistencies depending on character size and hitbox settings a lot lately. It’s been possible to, after jumping from a far height onto a ladder, basically “slide down” the ladder for miles before roblox grabs it on. I sure hope this is more, not less, consistent in that regard…

See the following:

https://i.gyazo.com/a8748caa66a7529d2db8e0b022f9b2bc.mp4

I don’t have time to test it at the moment, and it was so inconsistent before that I’m not even sure if I am capable of testing it, but if this new humanoid controller doesn’t make climbing 100% consistent, what’s even the point? …So I can only hope.

3 Likes

This is such a fantastic update! With the ability to properly collide with the ground while in motion and/or idle, this makes some use for many new projects and features, especially in some of my experiences! Air control improvements will also be huge and I am very glad that parkour can improve with better and more consistent humanoid physics! I am really excited to see what kind of improvements that are going to release to the new Humanoid Physics Controller! :smile:

1 Like

Amazing update! I’m looking forward to play around with this feature in my games.

1 Like

Oh, yes! Ever since I noticed the new classes in one of the release notes, I’ve wanted to see Roblox’s official take on physics-based character movement, with actual momentum and more natural jumping! (The automatic momentum transferrring and climbing on moving ladders are also great additions.)

Before this announcement, I added PhysicsCharacterController to my game, to see just how good physics character movement would feel. Everything flows smoothly and naturally there; Deceleration makes sense, and only happens when I’m moving fast enough, as shown in this video:


When I disabled PhysicsCharacterController and tried out the new physics controller by Roblox, I noticed that my character always slides as if they were running at full running speed when I release a key.

In this video, I do the same thing I did in the video above, running forward, releasing the W key, then briefly tapping WASD. You’ll notice that each time, my character always slides a couple studs, even though that never happened with PhysicsCharacterController:

If any Roblox staff are reading this, please fix this; I think the new physics controller is pretty awesome already, but this is the main seemingly bug I’ve found in it.

9 Likes

This is peak ROBLOX development from the physics team, props to y’all, amazing work. Really excited to see this out of beta and put to great use by a lot of devs! :+1:

1 Like

Oh wow.
More accurate humanoids that interact with physics better?
Mind blown.

I’ve considered writing my own humanoid from scratch to achieve things like this but this is going to save soooo much work and it’s probs better optimized too.

Only question I have is, will this humanoid work in different orientations?
(Example: game where gravity can change and where a character is attracted to a round planet, kinda Mario galaxy style.)

Does the animation state machine also still work mostly the same or is it different then what regular humanoids have?

1 Like

Very cool!
I noticed a quirk where the character would have a force applied to it randomly, but I can’t seem to reproduce it. (that might’ve been actual accurate physics lol)

If anyone’s looking to test the new momentum-preserved physics, here’s an uncopylocked test place I put together.

Also, incase you’re curious but lazy, this doesn’t work with CFrame. It seems to be using actual realistic physics math, and CFramed objects don’t have tracked velocity.

This is great, only suggestion would be to change the acceleration property to be something that runs at all times as opposed to a linear walk speed increase when starting and stopping. Hard to explain, but strafing in a circle in first person feeling very rigid as a consequence to this. I have a video of my own lerped walk speed system that feels much smoother in first person here.

Having acceleration be a smooth lerp with a target at all times as opposed to a linear tween helps greatly for the smooth fps-like movement. Unsure if this is how it works, but it does feel extremely jagged and tween-like, I’ve linked an example with 0.2 acceleration and 0.2 deacceleration on the ground controller here.

Amazing new feature however, great work as always. I’m so glad you’ve committed to reworking the Humanoid movement, long overdue. My ramblings may be nitpicky, but I’m a sucker for Source movement. (Don’t make acceleration and de-acceleration direction based!)

6 Likes

Seeing others having similar complaints regarding acceleration, it’s a hard thing to get right. Take your time and work out the issues while its still in beta, very excited to use this.

EDIT: Acceleration seems to be running the same de-acceleration without regard to the current velocity even when lightly tapping W, cancelling momentum in a way that feels awkward and rigid. This reply put it very well: New Humanoid Physics Controller - Beta - #82 by JoyfulFlowerMary

4 Likes

Is it possible to make quake or counter strike like bunnyhop movement?

2 Likes

This update sounds cool, however it will break obbies, which makes this update really terrible. That’s how I think about this update, because that is the main type of games that I make

Thank you everyone that’s provided feedback so far! It’s very important to us to fit everyone’s needs, and everything from tiny nit-picky tweaks to fundamental changes will be considered.

For those that are excited but haven’t given it a shot yet, I want to encourage you to do so! I believe that by spending some time you can really get a totally unique movement style that can be really satisfying to play with.

Remember, this will eventually replace the existing controller, so the more feedback we can get now to fix things the better.

I’m now going to reply to all the feedback, questions, and requests so far. Some questions were asked by several developers, so I paraphrased them and tagged those that asked. If it looks like I skipped your question, it may be because it’s already answered by someone else or in the main post! Or if it seems like I may have skipped it by mistake or misunderstood, feel free to ask again. I may also reach out to some of you directly to get more details on a specific bug.

The performance should be about the same.
Another key difference with the new controller is that the underlying systems are the same as our Constraint system. That means in our physics step, there’s no longer a separate “Humanoid simulation” and an “everything else simulation”. So, as we make general performance improvements to our physics simulation, they will also impact the controllers.

Yes we are looking into this. Due to what I mentioned above, any general solution we have to simulation security will also apply the the controllers.

Short answer: yes. More news on this coming very soon.

Our first goal is to get this new controller to fully recreate our existing movement behavior. Once that’s done, we absolutely will start adding to the Controller instances to enable additional movement options (and if needed, add entirely new types).

The best way to give feedback on this now, would be to try and achieve the movement you want with what’s available now, then request a particular thing you want to adjust once you get stuck. I totally expect that there are ways to tune the current controller suite to achieve various vehicle-like movement.

Hover: I expect you should be able to use the GroundController to configure this. You can adjust the “GroundOffset” property in real time to adjust how far off the ground you are. We also plan to have other properties that will allow you to adjust how fast/how much force is used to tune how quickly that changes. (StandForce/StandSpeed may do this now, but aren’t working how we want right now and thus are hidden in the Explorer)

Flying: Yes, I’m thinking we can get the AirController to a place where you can comfortably enable full 3D movement through air with it, like swimming.

Climbing side-to-side: Yes, will also be adding this

Yep also agreed, I have mostly the same answer to your post as I do for above. Fixing things like Spacebar not working, and orientation glitches, the diagonal movement are the first priority. Then, we can start exploring how this controller can be made more flexible (control up/down speed separately, etc)

This is also planned! The current thinking is to start, we will add an UpDirection property. Right now it’s always set to (0,1,0).

No, we are using the same floor/ladder detection as before. However, we are working on moving this to its own customizable system.

No, since moving parts this way has no velocity, there’s no momentum to conserve. There’s 2 ways to address this:

  1. Move parts physically, so they have velocity (ie PrismaticConstraint, AlignPosition)
  2. Set an AssemblyLinearVelocity on the anchored Part you’re CFraming/Tweening.

Agreed, I’m going to rethink how to handle jumping. Expect this API/Property to change.

Ah! That shouldn’t happen. Will fix.

I’m going to reach out about some of the bugs in your post. I want to explain this one here though:

This is happening because the MaxForce allowed for movement during FreeFall (AirController) is greater than gravity. So you can fix this by lowering the AirController.MoveMaxForce, and we probably want a lower default value for this.

Going to reach out for more info on the rest of your post, but wanted give some general tips on FallingDown and keeping upright

Right now, the FallingDown state is triggered when your character tilts past a certain angle (this will become customizable in the future)

With the new Controllers however, you can tune the “AlignTorque” and “AlignSpeed” on the GroundController that’s used to keep you upright. Right now, it’s a bit lower by default than before. This is so behaviors like getting smacked in the face with a beam look a bit more realistic. But you can adjust this so that you wobble around as much as you choose.

You can also use enable RigidityEnabled to really force you upright. The behavior of this should be identical to an AlignOrientation. You may notice that the “GettingUpController” (which is also a GroundController) has RigidityEnabled. This is so you always can get back up on your feet! But you can also disable this, forcing you to get up much slower if you choose.

Thanks for the feedback here. We will take the time to get it right, and I may reach out for more input later.

34 Likes

Feature request

We should be able to disable the “velocity inheritance” feature of avatars. Use case : we want to cancel all forward momentum if a player jumps while on a moving platform, since it “feels” better in the context of platformer games. This is pretty standard in a lot of platformer games, even mario games. Here’s an example of this in action in the game “a hat in time” :

While velocity inheritance may be desirable in some games, it is often not desirable in platformers, and as such, we need the ability to toggle this behavior (bonus points for letting us control this granularly).

27 Likes

I really like the new character controller.
It would be great to see a variable for the walk force of the player. Being able to choose if our characters can push heavy blocks or not without changing said parts weights would be amazing.
I would personally like to set this to a realistic value, and I think other developers will find this useful for pushing things that should have a ton of momentum or making it not possible to push their lightweight a-chassis cars.

Feature request

There should be an option to decouple lateral movement & rotational movement while in the air. Doing this would allow us to make lateral air movement keep the relative momentum of the moving platform we jumped off of! Right now, when a movement key is pressed while in the air, the player’s existing momentum is fully cancelled when they let go of the movement key, unless CancelAirMomentum is false on the AirController. However, setting it to false applies to both lateral & rotational movement! If I want to move forward then stop relative to the moving platform I jumped off of, my rotation isn’t cancelled either! I want to be able to have my rotation behave with its momentum being cancelled when I let go of a movement key (as if I were on the ground), while having my lateral movement keep its momentum relative to the platform I jumped off of, e.g. I press W, move forward a bit relative to platform, I let go of W, my original momentum before I pressed the movement key is restored (instead of zeroing out).

Here’s a demonstration of AirController having CancelAirMomentum set to true. Observe how all my existing momentum is cancelled as soon as I let go of a movement key:

Here’s a demonstration of AirController having CancelAirMomentum set to false. Observe how my lateral movement and rotational movement are coupled, preventing me from getting the relative lateral movement I want while making rotational momentum get cancelled when I let go of a movement key:

10 Likes

It looks like I’ll be spending a chunk of the weekend seeing how the update works with a fork of EgoMoose’s wallstick controller.

Any idea how soon this might happen? I use Wallstick because I have a game where gravity may be in an aribitrary direction, and I need moving inertial reference frames to be respected. I set workspace gravity to 0 and have a vector force on every assembly that is not anchored.
I have had to use the complex workarounds required by the Wallstick controller because I need

  1. To let the player character properly re-orient their feet toward the local gravity vector
  2. Allow players to navigate around moving vehicles without getting glitchy
  3. Allow players to climb ladders that may not be aligned to the default (0,1,0) up vector.

If I know UpDirection is coming soon, there isn’t much sense in updating WallStick right now because this new amazing wonderful update solves my first two problems.

So more flexible climb detection is exactly what I need to retire allmost all of what Wallstick needs to do now. I would only need it to fix the camera to work with a custom upvector, unless roblox is going to fix the camera controller and the relative movement input direction as well.

If you are unware, Wallstick works by running a script on the client physics update, making a clone of all blocks near the player, and re-orienting them to the local UpVector into an invisible “Physics World” with a copy of the player humanoid oriented foot-toward-down, so the built in blackbox character movement code responds to things like ladders oriented to the local UpVector and triggers the appropriate control and character state responses. That character model response is replicated back to the visible world the player sees. That’s all on the client. Optionally, that movement is also replicated to the server, then to all the other clients, so other players can see the correctly oriented character models.

I would love to do NONE of that.

Right now I can finally override the vector forces that go the wrong direction and drag forces that should not be happening in a vacuum. Setting the UpVector would mean so much.
Even if I need to adjust the character movement walking on moving surfaces somewhat, I can do that without the cloned Physics World concept.

I still need the character to respond correctly to stairs and ladders. Is that at all possible, or will I still be using WallStick for the foreseeable future?

6 Likes

It’s a beta, and won’t appear ingame until the update is fully released.

Will this make constraints on the character less broken? Trying to say, make a physics fishing rod has always lead to extreme instability.