HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Boss Cam Angle of attack

12-14-2008, 05:15 PM#1
Sunwarrior25
I'm currently building a test map for a campaign, and would like to know how to change the camera's angle of attack point from behind the hero, and at the boss (especially if it flies).

here's what the camera looks like so far:
Inaperiodictrigger
Collapse Events
Time - Every 0.50 seconds of game time
Conditions
Collapse Actions
-------- whoops! forgot to post the For each Integer A statement (though it's in the trigger) --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(BossRoom <gen> contains HeroDummy[(Integer A)]) Equal to True
Collapse Then - Actions
Camera - Lock camera target for HeroPlayer[(Integer A)] to Boss, offset by (0.00, 0.00) using Default rotation
Camera - Set HeroPlayer[(Integer A)]'s camera Distance to target to ((Distance between (Position of HeroDummy[(Integer A)]) and (Position of Boss)) + 1000.00) over 0.50 seconds
Camera - Set HeroPlayer[(Integer A)]'s camera Rotation to (Angle from (Position of HeroDummy[(Integer A)]) to (Position of Boss)) over 0.50 seconds
Camera - Set HeroPlayer[(Integer A)]'s camera Angle of attack to 345.00 over 0.50 seconds
Set Camera[(Integer A)] = (Current camera)
Collapse Else - Actions
Set Camera[(Integer A)] = GameCam <gen>
Camera - Apply Camera[(Integer A)] for HeroPlayer[(Integer A)] over 0.50 seconds
Camera - Lock camera target for HeroPlayer[(Integer A)] to HeroDummy[(Integer A)], offset by (0.00, 0.00) using Default rotation
-------- . . . --------
(P.S. I'm only setting the camera for the movement functions)
12-14-2008, 05:26 PM#2
Here-b-Trollz
Z angle = Atan2( height, distance )

so, you could do
Trigger:
Set TempHeight = Fly Height of <Boss> - Fly Height of Camera
Set TempDist = Distance Between Camera and <Boss>
Custom Script: set udg_AngleOfAttack = Atan2(udg_TempHeight,udg_TempDist)*bj_RADTODEG
Camera - Set HeroPlayer[(Integer A)]'s camera Angle of attack to AngleOfAttack over 0.50 seconds
12-14-2008, 06:14 PM#3
Sunwarrior25
How do you find the fly height of the camera? Source or Target Z?

EDIT: Or a dummy unit where the camera is?


nvm, thanks! (just tested it on a druid of the talon with wander) + candy!