Support world and local rotations on N64
is there a way to rotate in a script? And of course change the position in a script.
Yeah you can currently rotate by accessing the rotationAxis and rotationAngle properties on the Actor object. Below is an example of continually rotating the actor this script is attached to:
void $Update(Actor *self)
{
if(self->rotationAxis.y < 0)
{
self->rotationAngle = -self->rotationAngle;
}
self->rotationAxis.x = 0;
self->rotationAxis.y = 1;
self->rotationAxis.z = 0;
}
To translate you can modify the position property. It contains 3 components x, y and z. So to move forward you could do
self->position.z += 0.1f
I'd like to add some more convenience methods to make this a bit easier. If you study the actor.h file in the engine directory you'll see what is able to be modified. https://github.com/deadcast2/UltraEd/blob/master/Engine/actor.h