- Home /
Question by
TomerA · Apr 08, 2014 at 03:27 PM ·
javascriptfunction updatevector3.slerp
Why isn't this code working?
#pragma strict
function Start () {
}
function Update () {
transform.position +- Vector3 (0, 10, 0) * Time.deltaTime;
}
the cube is not moving at all
Comment
Answer by Eric5h5 · Apr 08, 2014 at 03:33 PM
, not +- (I wasn't aware that would even compile).
It works for me on a simple cube. Check if the script type is javascript and if you have it attached on your object, it also has to be enabled in the inspector.
#pragma strict
function Update () {
transform.position += Vector3 (0, 10, 0) * Time.deltaTime;
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613142237im_/https://answers.unity.com/themes/thub/images/avi.jpg)