Animating Keyframes > Advanced Animation: About Expressions > Sample Expression Setups >

# Spinning Dagger

To see this example, load the setup named expressions_spinning_dagger into Action. This example features a dagger moving in an arc. The dagger's Y-axis is aligned with the direction of its movement and the rest of the dagger spins around its axis.

The dagger's rotation is created through the dagger's rotation of its negative Y-axis towards the direction of its movement and the rest of the dagger spins one full rotation around this same axis every 32 frames. The align function is used to generate the rotation vector.

Channel | Expression
--- | ---
dagger_axis.rotation | align(dagger_axis.position, (0,-1,0), frame * 2 * PI / 32)