Javascript scripting examples

  • Here you can find some javascript scripting examples:

    1. The model will be anchored to the camera and will look directly to at it. adjust the variable ‘distanceFromCamera’ in order to control how far it will be from the camera.
    var distanceFromCamera = 2.0;
    function update(deltaTime)
        object.transform.position = Vector3.add(Camera.position, Vector3.multiply(Camera.forward, distanceFromCamera));

Log in to reply