How to make camera follow unit's height

Eimtr

Member
Reaction score
1
Ok this is really my last question for World Editor, as after that I'll be moving completely to sc2 editor. It's just that I hate cameras and couldn't figure that out:

I created a camera object above a unit with the view and distance I want. The unit will change its flying height at 100 rate. I want to make it so that the camera object follows the unit from above at the same distance so that when the unit's flying height goes up, the camera also goes up, so it follows it.

I could use a trigger where the distance to target? is changed every second but it didn't work. SO how can I make a view that follows the unit? Since if you make your flying unit reach 1000 Height triggers can't detect whenever your unit is at 550, 678, 789. 890 etc height, it will only detected the final 1000. So maybe an Every X second trigger to move the camera up along with targeting the unit? The unit just goes up, so no need to make it follow horizontally (i.e unit is not moving to X and Z axis)
 

Sim

Forum Administrator
Staff member
Reaction score
534
Did you try the JASS function GetUnitFlyHeight?

> The unit just goes up, so no need to make it follow horizontally (i.e unit is not moving to X and Z axis)

You mean, the X and Y axis.
 

Eimtr

Member
Reaction score
1
I was trying with GUI/MUI as I dont work with JASS. But I could paste a jass code if it will do it, just need to know what to replace. Also isn't it getting the final flying height just like with GUI current flying height equal to the flying height you select it/ order it/trigger it to become and it doesnt really catch your height at any given moment

EDIT: It is something temporary Im making, I did it by using 20 cameras objects and at different distance towards the unit and switched between them, as I said temporary, and it worked just fine.

[SOLVED]
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top