Roll
Last updated
Was this helpful?
Last updated
Was this helpful?
To roll is to move in a particular direction by turning over and over on an axis.
This motion effect recreates the rotation changes in the walking animations that a lot of first-person games have for their camera and guns.
This component makes the object it's placed on rotate as the player moves, simulating a 'rolling' movement, we normally use it together with the Bob script to complete the walking animation look.
The way this component produces the rolling effect is by using the values produced from an infinite and then multiplying those by the player's input (to only produce the effect while moving), and the current state's multiplier for this component.
Once it finishes calculating the values, it then applies them to the object trough the using the to calculate the new rotation based on them.
When changing the rolling effect, there is one very important variable, and that is the wave
field. As the value is of the type, the values you can change are the amplitude
and the rate
, which tell the component how to rotate, and how fast to do it.
It is also very important to keep in mind that this component has a state multiplier, and thus the value from it can also affect the result.
Another important point to keep in mind is the that every has, which can change how the effect looks entirely.