I’ve seen others ask about this error and some say it appears in the editor only, some say it’s because 1 or more of the Vector3 values is null.
I can see in the debug that my project thinks the x and z values are null - but I don’t understand why, this is a rigidbody and I don’t calculate the Vector3 through my code. I use AddRelativeForce() & AddRelativeTorque()
This error occurs when my player hits a wall in a specific part of a specific level. Could it be related to the bounce texture I have on my level mesh maybe? Honestly got no idea.
Edit: kmgr wanted to see code so here’s the most relevant bit. Like I said, I don’t edit the Player’s transform directly. Only the rigidbody.
function FixedUpdate () {
var moveHorizontal : float= Input.GetAxis ("Horizontal");
var moveVertical : float= Input.GetAxis ("Vertical");
if((moveHorizontal < 0) || Input.GetKey("a"))
{
GetComponent.<Rigidbody>().AddRelativeTorque (0,-rotationSpeed,0);
} else if((moveHorizontal > 0) || Input.GetKey("d"))
{
GetComponent.<Rigidbody>().AddRelativeTorque (0,rotationSpeed,0);
}
if ((moveVertical > 0) || Input.GetKey("w"))
{
GetComponent.<Rigidbody>().AddRelativeForce (Vector3.forward * speed);
} else if ((moveVertical < 0) || Input.GetKey("s"))
{
GetComponent.<Rigidbody>().AddRelativeForce (Vector3.back * speed);
}
}