When I run a 'floating' script I get this error.
Quaternion To Matrix conversion failed because input Quaternion is invalid { -1.#IND00, -1.#IND00, -1.#IND00, -1.#IND00}
The scripts I'm running are concerning a ball. The ball has two scripts:
BallMove:
var moveforce = 5.0;
private var vecmove = Vector3.zero;
function Update ()
{
vecmove = Vector3(Input.GetAxis("Horizontal") ,0 , Input.GetAxis("Vertical"));
vecmove.x *= moveforce;
vecmove.y *= moveforce;
vecmove.z *= moveforce;
rigidbody.AddForce(vecmove);
}
Float
var waterLevel = 0;
var floatHeight = 0;
var buoyancyCentreOffset = Vector3.zero;
var bounceDamp = 0.2;
function Update ()
{
var actionPoint = transform.position + transform.TransformDirection(buoyancyCentreOffset);
var forceFactor = 1 - ((actionPoint.y - waterLevel) / floatHeight);
if (forceFactor > 0)
{
var uplift = -Physics.gravity * (forceFactor - rigidbody.velocity.y * bounceDamp);
rigidbody.AddForceAtPosition(uplift, actionPoint);
}
}
The ball is a rigidbody. I'm using Javascript but the 'Float' script is adapted from C#. What does the Error mean?