How to make a shuriken spin



as you can see from the screenshots there is a shuriken following a path, it looks pretty good but it needs to spin to create the full effect. You can’t see it on the screen but it’ll smash through a vase at the end and stick to a wall. Can someone tell me how to make it continuously spin until it hits the wall?
Thanks.

Add a driver to the rotation axis of the shuriken - RMB click the required axis in the Transform boxes and select “Add single Driver”.

Set the driver (you do this in the Graph Editor in Drivers Mode) to “scripted expression”.

Check “Autorun Python Scripts” in User Prefs => File tab, or scripted expressions will not work.

Type the following into the box: (frame - 1) / 5 this will rotate the shuriken one radian - there are approximately 6.28 radians in a full circle - every 5 frames.

Press Play and see if the rotation is correct - to speed it up change the 5 to a smaller number, or change the expression to (frame - 1) * 2 for example this will rotate the shuriken 2 radians every frame. if you set the expression to (frame -1) * 2 * pi it will rotate the shuriken one revolution every frame.

To stop it rotating add a Limits constraint to the Driver (done in Graph Editor => Drivers Mode) and set a maximum rotation value - that being the value when said shuriken hits the wall.

The (frame - 1) bit in the Driver expressions mean that the shuriken does not rotate until frame 1 (the normal start frame for an animation).

Cheers, Clock.

PS. Note that all rotations in scripted expressions are in Radians NOT degrees and there are 2 * pi or approx. 6.28 radians in a full circle.

PPS. welcome to BA!

rotation keyframe in Z axis maybe can help.

select suriken
with the cursor over the viewport hit “i” in your keyboard , select rotation, now you have a single keyframe , if you go under the object menu (the little yellow cube) you can now see the rotation panel is highlited
in the timeline go to the end of your animation and set a new rotation, I recomend to do it on the Z axis, then add a new rotation keyframe

hope it can helps