I have the following script to set the position of a rigidbody and a skinmesh, which works fine if "working at start" is checked. I would like to run this script with an EventOnContact, but it doesn't seam to work. What am I doing wrong?
Vector3 ObjectLocation;
void Main()
{
iObjectLocation(OBJ_0,ObjectLocation); // RigidBody
iObjectLocation(OBJ_22,ObjectLocation); // SkinMesh
ObjectLocation.z = -26.4936;
ObjectLocation.x = -131.811;
ObjectLocation.y = 18.1956;
iObjectLocationSet(OBJ_0,ObjectLocation);
iObjectLocationSet(OBJ_22,ObjectLocation);
}
Vector3 ObjectLocation;
void Main()
{
iObjectLocation(OBJ_0,ObjectLocation); // RigidBody
iObjectLocation(OBJ_22,ObjectLocation); // SkinMesh
ObjectLocation.z = -26.4936;
ObjectLocation.x = -131.811;
ObjectLocation.y = 18.1956;
iObjectLocationSet(OBJ_0,ObjectLocation);
iObjectLocationSet(OBJ_22,ObjectLocation);
}