Question by
Sazails · Dec 26, 2017 at 10:31 PM ·
transformmeshtransform.positionwheelcollidercentre
Wheels not going to the right place of wheel Colliders
I have made a simple script for prototype project. I made a tank and assigned tracks, The point is that the wheel meshes go to the middle of the object I guess. I have provided link to video for clearer example.
I've shortened down the script to one wheel
public WheelCollider wheel1R;
private Vector3 centre1R;
public GameObject wheel1MeshR;
private void Update()
{
centre1R = wheel1R.center;
}
private void FixedUpdate()
{
wheel1MeshR.transform.position = centre1R;
}
Comment
Your answer
Follow this Question
Related Questions
how to make the player move in only 2 directions? 0 Answers
Get Random transform point inside collider 0 Answers
How to prevent my mesh from being distorted when set as a child? 0 Answers
Move GameObject with transform.position 1 Answer
Getting a smooth rotation with Quaterminions slerp in IEnumerator 1 Answer