Hello,
The following script didn’t work and don’t find why … Somebody can help ?
The goal : using spacebar to switch between 2 positions.
Regards,
Patrick
var camActiveB : GameObject;
//… all variables declared …
var camSwitch : boolean = false;
function LateUpdate () {
if (!targetB)
return;
// … Other operations …
if(camActiveB.active == true camSwitch==false Input.GetKey(“space”)){
DistanceB = bdist2;
HeightB = bhei2;
bside = bsid2;
camSwitch=true;
}
if(camActiveB.active == true camSwitch==true Input.GetKey(“space”)){
DistanceB = bdist1;
HeightB = bhei1;
bside = bsid1;
camSwitch=false;
}