How to roll while pan

Posted By: Mythran

How to roll while pan - 02/03/12 23:14

How do i make the player roll to a maxium of 20º while the player is panning? The player must also roll to the side the player is panning.

my.pan = ((1 - (SmoothSpeed / 25) * time_step) * (my.pan - camera.pan) + camera.pan); // This is the code used to pan the player.

Thanks.
Posted By: Joozey

Re: How to roll while pan - 02/03/12 23:25

You'll need to find the change in speed, not just the speed. If your speed changes, then you want to roll (I suppose).

my.roll = clamp( my.roll + changeOfSpeed * time_step, -20, 20 )
© 2023 lite-C Forums