Re: [Algorithms] Frame independent Camera Shake
Brought to you by:
vexxed72
|
From: Jason H. <jh...@st...> - 2009-12-19 09:28:44
|
Yes. You don't want the camera position to wander away, so the random amount is an offset from where the camera 'actually' is, before applying any shake. Every frame, you just pick a new spot to put the camera. The intensity is controlled by the scale factor. You might want to make sure the shake vector is a randomized unit vector within the plane parallel to the near plane (ie. XY in camera local space), so you can get more reliable results. Or perhaps non-unit will appeal to you. That's more a matter of taste than science at this point. JH Jason Hughes President Steel Penny Games, Inc. Austin, TX Amir H. Fassihi wrote: > Thank you Jason for the descriptions, would you elaborate the > non-periodic shake a bit more. Does this : camTrans = vector.random() > * scale mean that a random translation is computed every frame and > applied to the camera? > > |