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

Updating an array indices dynamically

$
0
0
All, I have a script that records the time and 3D transform positions since game load. I want to end up with an array like this, which records all of the positions and timestamps collected for the positions until it reaches a certain position: myArray =[ {positionX : #, positionY: # , positionZ : #, timeStamp: #}, {positionX : #, positionY: # , positionZ : #, timeStamp: #}, etc...]; Here is what I've done to take a stab at this, shortened for easier read: var myObject : GameObject; var myArray = new Array (); var seconds; function Update(){ //stuff here to find seconds, deleted to save space for (var i=1;i

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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