I have a problem, I am making a car with 4 raycasts, but the raycast are not doing anything. The debug doesnt return anything.
void FixedUpdate() {
RaycastHit[] hit = new Raycasthit[4];
for (int i = 0; i < 4; i++) {
if (Physics.Raycast(wheel<em>.transform.position, wheel_.transform.TransformDirection(Vector3.down), out hit*, distance, 0)) {*_</em>
wheel*.transform.position = hit.point;* Debug.Log(“hit”); } } } Can you please help me?
Nevermind, I fixed it. It turns out my wheels’ parents were rotated 90° for some reason, and its “down” was actually forward. I fixed it and it works now.