Closed skompc closed 9 years ago
i just found the answer to my own question by going through the source code... code should be as follows for anyone who needs it:
var sphere = VR.sphere()
.setMaterial('metal')
.setScale(1.4)
.moveTo(1, 9, 2);
var spherePosX = sphere.object.position.x //get X position of sphere
var spherePosY = sphere.object.position.y //get Y position of sphere
var spherePosZ = sphere.object.position.z //get Z position of sphere
put a '.toString()' at the end if you need to display it on screen through a text object
Great. Glad it worked out.
hi, im trying to make a game that supports physics and collision without needing any other external libraries, and im stuck on getting the objects position... heres some example code so you can see what im trying to do...
i know the above code is wrong, but idk what to put in place of 'sphere.x', 'sphere.y', and 'sphere.z' please help me!