HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Complete Camera Movement

07-11-2004, 11:53 PM#1
FrostCyrus
On my map I'm trying to make players have more camera freedom. I've tried to make a trigger that makes it so that the player uses the arrow keys to move the camera around. I already know how to get an advanced trigger to disable keyboard scrolling (so it doesn't get annoying during gameplay), but I can't figure out how to make the camera rotating etc... triggs work.
I want to be able to rotate a camera a certain amount of degrees (up to a full 360) around the camera's current view (it's not locked onto anybody or anything). Can somebody help me on how to do this?
07-12-2004, 12:19 AM#2
johnfn
Just have a variable store the current camera rotation, and then when they press a key add or subtract from the variable. Dont forget to set back at 360 when they subtract from 0. If any more help is needed I'll try to help.
08-06-2004, 05:33 PM#3
FrostCyrus
thanks. Works now!
08-07-2004, 12:48 AM#4
hirush
Hi, it seems this is kind of trigger that I could use, however I have some questions regarding trigger. I'm gonna post my triggers here and please help me where I do it wrong T.T

First I made 2 variables one is for camera rotation the other one is for distance between camera and target

Map int
Events
Map initialization
Conditions
Actions
Set Camera_Rotation = (Rotation of the current camera view)
Set Camera_Distance = (Distance to target of the current camera view)

=============================================================
This trigger is fine

CamLock
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds
Camera - Lock camera target for Player 1 (Red) to Blood Mage 0000 <gen>, offset by (0.00, 0.00) using Default rotation
Camera - Change camera smoothing factor to 30.00

==============================================================
This trigger in theory should + 10 degrees to current camera rotation when left arrow key is pressed each time. But it turns out that it will only work for once then it won't rotate anymore. Anyone spot the problem?

TurnLeft
Events
Player - Player 1 (Red) Presses the Left Arrow key
Conditions
Actions
Camera - Set Player 1 (Red)'s camera Rotation to (Camera_Rotation + 10.00) over 1.00 seconds


Any help will be greatly appreciated :)