Hello everyone, I’m trying to make a puzzle level in my game , with buttons that activate the rotation of a statue , here is the code
var Statue : GameObject;
float MinClamp1 = 0;
float MaxClamp1 = 90;
float MinClamp1 = 90;
float MaxClamp1 = 180;
float MinClamp1 = 180;
float MaxClamp1 = 270;
float MinClamp1 = 270;
float MaxClamp1 = 360;
function Update () {
if (Statue.transform.rotation.y > 360){
Statue.transform.rotation.y = 0;
}
}
function OnTriggerStay()
{
Statue.transform.rotation.y = Vector3(Mathf.Clamp(Statue.transform.rotation.eulerAngles.y, MinClamp1, MaxClamp1),0,0);
}
But it doesn’t work , I’ve got a console error message
Assets/MesAssets/MesScripts/TriggerStatueRotation.js(3,6): UCE0001: ‘;’ expected. Insert a semicolon at the end.
Please ! What should I do ?