Kick
Method
Apply a temporary angular offset to the player camera, think recoil
for a first person shooter.
Given a zero-ed out initial rotation, the camera will rotate to the given degrees offset, then return
to zero over time. The rotation is applied with a parabolic function over time using kickDecay
to
drive the slope. A larger kickDecay
creates a shorter/faster kick.Kicks are additive, but there can only be one active kick. This means two kicks in rapid succession
can combine to create a larger kick, but two kicks in instant succession (during the same frame) will override
each other, and will not produce a larger kick.
Parameters
Parameter | Description |
---|---|
Vector2 degrees |