naxhomes.blogg.se

Unity 3d car script download files
Unity 3d car script download files








Later edit: The reason I asked this question is that I didn't knew that the vector car.forward is different than the static vector I wrote. Rb.MoveRotation(rb.rotation * deltaRotationLeft) Quaternion deltaRotationLeft = Quaternion.Euler(rotationLeft * ltaTime) Rb.MoveRotation(rb.rotation * deltaRotationRight) Quaternion deltaRotationRight = Quaternion.Euler(rotationRight * ltaTime)

unity 3d car script download files

Rb.MovePosition(car.position + backward * speed * ltaTime) Rb.MovePosition(car.position + forward * speed * ltaTime) Vector3 rotationLeft = new Vector3(0, -30, 0) Vector3 rotationRight = new Vector3(0, 30, 0) Vector3 backward = new Vector3(0, 0, -1) If anyone has some good ideas i would love to hear them. I kept trying to play with the values of the forward vector but none of my attempts produced a good result. The move it makes it is like moving with forward one side rotated. I want to move the car and so far I can move it forward and backward, and I can also rotate it to left and right and these two moves work fine.īut after I rotate it to the right and i try to make it moves forward it move in the same direction as before without taking into account the turn just made.

unity 3d car script download files

I am trying to make a game in unity and this game uses a car.










Unity 3d car script download files