LinearVelocity in unity6 also change the rotation of my camera on X axis, why?

I’m a young dev and I did some characterController already but since a recent project that I started, where I am the main develloper of the game, I need to do a charactercontroller on my project to move my character without a problem, but in unity6 u can’t use the Rigibody.velocity only the linearVelocity, so I say whatever, because it seems to be the same thing like they said on the docs, but when I start the simulation, 1. The script work like usual 2. But the rotation of my GameObject is rotating on the X axis at the same speed that my move speed. My issue is the next sentence : How do I stop that ? Why there a diffrence between velocity and linearVelocity ? Or What I’m missing here ?

Of Course, I already Debug my script more than one time but the script only change linearvelocity (only two line of code ), I can show you the script if u want

Sounds like you wrote a bug… and that means… time to start debugging!

By debugging you can find out exactly what your program is doing so you can fix it.

Use the above techniques to get the information you need in order to reason about what the problem is.

You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.

Once you understand what the problem is, you may begin to reason about a solution to the problem.

If your character controller object is rotating, its rigidbody is probably not set to “kinematic”. Character controllers almost always use kinematic physics (as opposed to regular or “dynamic” physics) because you absolutely don’t want a player to get pushed aside when something heavy impacts the player, including another player or merely a projectile.

Unless, of course, the game design accounts for that and you’re aiming for a rather whacky kind of character controller (think: physics-based party games where the fun is all in the indirectness of the controls).

1 Like

I don’t know why it would have an influence but thanks for the advice I’ll try :slight_smile:

So it was not the kinematic, because if I disable it, the character controller juste stop working, but I did made an error, not in my script but I did a change about the rotation of the body of the object (I want the cam to be Isometric but I want the character to move on a “+” axis not a “x”), it’s only don’t work when the body it’s turn that I rotate with no reason