Hi guys,
I am doing the Space Shooter tutorial and have been tweaking some parts here and there.
For example, I have replaced the supplied laserbolt (which only moves upward in the tutorial) with a small triangle that should move upwards along the y axis as well. It should, however, also rotate around its own z axis so that it looks more like a shuriken.
For the movement upwards (along the y axis) I am using (in FixedUpdate):
rigidbody.velocity = transform.up * speed;
For the rotation I have tried several things, for example:
rigidbody.rotation = Quaternion, Euler(0, 0, 20);
The problem with this is that it also affects the x-coordinates. How can I make the triangle object rotate around its own z-axis while still having it fly upwards in parallel to the y axis?
Thanks