Trying to move an object around by sending the position and velocity.
I keep getting an exception thrown saying that the parameters do not match the signature.
parameters do not match signature
GamePlayer.OnSetPosVel (UnityEngine.Vector3)
My guess is that it has something to do with the exception saying that there is only one Vector3 when there should be two. No matter what I do, it doesn't seem to refresh the function.
How can I fix this?
Here's the code I use to send the data:
public void setPositionVelocity()
{
Vector3 vel = velocity;
Vector3 pos = transform.position;
tno.SendQuickly(12, Target.AllSaved, pos, vel);
}
Here's the code I use to set the data:
[RFC(12)]
void OnSetPosVel(Vector3 oPos, Vector3 oVel)
{
transform.position = oPos;
velocity = oVel;
}