Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How to make a camera move to a location and then stop using Java Script

$
0
0
Hi i'm trying to make a camera move to a location and then stop using java script. Here is my attempt at it. var speed : float = 0.2; var myPosition : float = 0; var myPos : boolean = true; function Update(){ myPosition = transform.position.z; if (myPosition < 20.21); myPos = true; } function Start(){ var myPos : boolean = true; do { Check(); }while(myPos == false); } function Check(){ this.transform.position += this.transform.forward * this.speed; }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>