Stuck with non humanoid walk system

I wrote here so many times, but hey.
So i had problems with the inflexibility of Humanoid:Move(). for my case at least
But there is a problem. I made it and it acts like it had a seizure. See below:

!!EPILEPSY WARNING!!

robloxapp-20210621-2336389.wmv (935.0 KB)

Setup is pretty simple. Get MouseDelta fancy word for how much the mouse moved in a frame and rotate the BodyGyro.CFrame by that ammount… But it snaps back and forth, it looks like.

Upon making a demo, a new problem occured. Wont rotate until touched. May help solving the problem.

Demo.rbxl (30.8 KB)

Why does it become a stroboscope? Any help is appreciated.
I have to sleep so if response is not fast… that’s why.

Can you also move up and down or just left to right?

It makes sense to only rotate the HumanoidRootPart on the Y axis, so only sideways.

So they can’t look up and down? it looks like in the video the camera tilts to the side a bit. And why do you use a bodyGyro instead of just roating the CFrame?

1 Like

They can look up and down in the original. I just isolated the problem and presented it simply.

Second. In the movement system i made the moving of the HumanoidRootPart is done by a BodyVelocity, and it needs to “balance” so to say.

Edit: In bed. Can’t try. But can you keep it balanced with CFrame lerping? Is it even any good?
Edit 2: Could you move it by cframe? You made me think. I won’t be able to sleep. :smile:

What seems to be the problem is you are trying to change the CFrame angle by a number Delta which wont work unless you are just rotating on the one axis (Y) this is because if you change the Y and say X axis angles they will act on eachother. So if you changed the Y axis to look left or right and then changed say Z or X to look up/ down then changing Z and X would change the value of Y. To combat this problem you can use something called the dotProduct change the angle.
Second: I would probably use CFrame to move the rootPart. If you arent allowing the player to move the camera up and down and just left and right then what would be another factor of the shaking is you trying to turn it while a bodyVelocity is being applied(this is why I recommend cframe) Third: I dont know what the lerping would be used for. If any of this didn’t make sense which is probably a strong possibility and you have any questions feel free to ask.

1 Like

Nice explanation but a few things for your attention.

The previous “workaround” version used ‘CFrame’ to rotate the ‘HumanoidRootPart’. That version worked so i thought i could reuse it with ‘BodyAngularVelocity’.

Rotating it by a number worked in the “workaround” version so idk what’s all this.

Man i need to learn theese things exist.

Yeah that… I’m tired. Hence the edits.

Smoothness really. All of this will be calculated frame by frame so if i move half way, then half of that, then half of that, then… It’s just better this way, otherwise it would be choppy, unnatural even.

They can. I explained it here:

Anyways, thanks for showing my tired brain that ‘CFrame’ exists and i used it in the past.

Marked as solution and thank you for your time. :smile:

The lerping wouldnt work becuase if you kept on doing half of it, it would go infinitely. instead while the button is being held you can have a loop moving the CFrame by a unit vector with a magnitude of a speed (cf = cf + cf.LookVector * speed(usually 1 but could be less to make it smoother). No problem!

Lerping did work tho.
But thx for the new solution.

Without BodyGyro the character falls over.
the force of the rotation was too high and Dampening was too low.
Ignoring the CFrame solution.

maybe i should not be working tired Anyway it works with BodyGyro.

1 Like