Different rotation speeds
by rwillis · in Torque X 2D · 08/26/2007 (10:44 pm) · 2 replies
If I create a T2DSceneObject manually in code like below then it rotates very quickly.
T2DSceneObject enemy01 = TorqueObjectDatabase.Instance.FindObject("enemy01");
enemy01.Visible = true;
public void Update()
{
enemy01.Rotation += 1;
}
But if I do it through a component like below then it rotates very slowly. Why is this?
public void SceneObject
{
get{return _sceneObject;} //owner
}
SceneObject.Rotation += 1
T2DSceneObject enemy01 = TorqueObjectDatabase.Instance.FindObject
enemy01.Visible = true;
public void Update()
{
enemy01.Rotation += 1;
}
But if I do it through a component like below then it rotates very slowly. Why is this?
public void SceneObject
{
get{return _sceneObject;} //owner
}
SceneObject.Rotation += 1
About the author
#2
08/28/2007 (3:10 pm)
Yea, it's getting reset back to zero. Has anyone noticed this happening to them also? Basicly, doing "SceneObject.Rotation +=1" (in which SceneObject refers to the object the component is on) causes the object to rotate much slower than if it was "objectreferencedThroughScript.Rotation +=1", in which the object was referenced through script.
Torque Owner Kevin R.