Open faizalmuzakki opened 5 years ago
var spaceship = null;
THREEx.SpaceShips.loadSpaceFighter03(function(object3d){
scene.add(object3d)
spaceship = object3d
spaceship.position.x = 0
spaceship.position.z = 20
})
this code gives me error -> spaceship is undefined
var enemy = new THREEx.SpaceShips.loadSpaceFighter02(function(object3d){ object3d.position.x = 0 object3d.position.z = 20 scene.add(object3d) })
how to get the enemy position? because i wanna do looping for the z position, so the spaceship apporaching. like enemy.position.z (?) but this give me an error. pls help