Hello everyone,
I’ve got a problem with my collision. Oh I think it’s a very nooby problem, but it begins to burst out my head…
I created three boxes : a ground, a wall and a player.
I set a rigidbody on my player and i put a script to move him :
var speed = 5.0;
function Update () {
var x = Input.GetAxis("Horizontal") * Time.deltaTime * speed;
var z = Input.GetAxis("Vertical") * Time.deltaTime * speed;
transform.Translate(x, 0, z);
}
Well… You ever saw this ! Haha !
Ok, my problem is that when my “player” is moving to the wall, he is “shaking” like when he wants to go through the wall and come back, and again, and again… I ever saw this in darkbasic when i tried to make my own collision system (how boring…). I wonder if there’s a trick to dodge this problem.
Should i add more script ? Where could i found usefull information about my problem ? (i’ve already saw the “Physic” section and it didnt help me)
Thanks !