Moving a 3D player without player controller

Hello,

I’ve been looking at making a 3D character for a sort of platformer.

The character walks, rotates, jumps…

Obviously, I would like to make use of unitys Physics for everything.

I came to the first step, get the block to move, and land on platforms!
There is a PlayerController script, but I would like and try my hand at making my own movement, collision logic, etc…

I tried to update his position, and velocity, directly.
The position does not collide correctly
The velocity tips the guy over
Locking the rotation for X and Z does not let the guy move straight foward, he wiggles.

Basically, I came to the realization that I have no idea of the correct implementation for this.
Any suggestions?

Thanks!

you dont update velocity, you addforce. But for a player IT MAKES VERY little sense to use physics. Because your going to want him to violate it. THats why there is a charactercontroller.

You dont want to limit him to a 10 inch jump and stuff, so you’d just be using physics to give him unrealistic results. But if you want to.

you can locking him to the terrain by ensuring his forward is parallel to the ground. if you take player.transform.right and you crossproduct it with the global up, or if you have hilly terrain with the terrain normal you get from a raycast at the ground, you can get what his forward should be and normalize it and then set his forward to that.

If you dont understand that you can ask for some detail and i’ll try to explain it. :slight_smile: