Camera rotation
by Ryan · in General Discussion · 07/11/2008 (6:38 am) · 2 replies
When player gets damage the camera should rotate left-right or up-down in whatever direction.This shows that player is out of control for sometimes only.How will i rotate camera automatically. ???
#2
You may be able to get the desired result by tweaking some of the parameters such as amplitude and so forth, but even if you cannot, it's relatively straight forward to expand or derive a new fx to do what you want.
07/17/2008 (2:11 am)
It's also worth looking at the CameraFX manager, in particular the "ShakeCamera" fx, which can be used to apply a shake to the camera upon collision/damage. You may be able to get the desired result by tweaking some of the parameters such as amplitude and so forth, but even if you cannot, it's relatively straight forward to expand or derive a new fx to do what you want.
Torque Owner Alex Stone
You'll need to modify ShapeBase::getCameraTransform(F32* pos,MatrixF* mat) in the engine. You can add some state to the ShapeBase class and a script method or two that you can use to override the standard camera transform and force it to move in the direction you want it to and then slide back to its original position.