• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Camera height?

Status
Not open for further replies.
Level 16
Joined
Jun 24, 2009
Messages
1,409
I'm using editor for years now but I never made a big bridge on a high place so now I'm in some trouble. When I move over the camera to see the bridge and the crossing units, the camera height drops to the height based on the field below the bridge. How can I fix this? These are the things came to my mind but I don't know which one to choose.

  • Using triggers changing the height of the camera (have to force the camera on the players' hero)
  • Use alpha tile and lift the ground (It would fck up the terrain a bit and I'd have to change the original concept)

The bridge:
2qs09xk.png
 
Last edited:
Level 16
Joined
Jun 24, 2009
Messages
1,409
Have you tried invisible platforms?

Invisible platforms wont lift the camera.

use a dummy unit as your camera eye, when height of unit changes or you move your dummy unit, so does your camera...

Thats just the more complicated version of the first option I wrote....

Edit: bump, also the the second option is not viable due to the angles and the sizes I used for the bridge.
 
Try this:
  • Camara
    • Acontecimientos
      • Tiempo - Every 0.02 seconds of game time
    • Condiciones
    • Acciones
      • Cámara - Lock camera target for Jugador 1 (rojo) to UnitVar, offset by (0.00, 0.00) using Rotación predeterminada
      • Cámara - Set Jugador 1 (rojo)'s camera Distancia al objetivo to 1800.00 over 0.00 seconds
      • Cámara - Set Jugador 1 (rojo)'s camera Ángulo de ataque to 310.00 over 0.00 seconds
      • Set Loc_UnitVar = (Position of UnitVar)
      • Custom script: set udg_Height = GetLocationZ(udg_Loc_UnitVar)
      • Cámara - Set Jugador 1 (rojo)'s camera Desplazamiento de altura to (Height + 100.00) over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Loc_UnitVar)
Edit: Attached picture.

attachment.php
 

Attachments

  • blabla.jpg
    blabla.jpg
    117.2 KB · Views: 288
  • Camera
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Camera - Lock camera target for Player 1 (red) to YourUnit, offset by (0.00, 0.00) using default rotation
      • Camera - Set Player 1 (red)'s camera Distance to target to 1800.00 over 0.00 seconds
      • Camera - Set Player 1 (red)'s camera Angle of attack to 310.00 over 0.00 seconds
      • Set Loc_YourUnit = (Position of YourUnit)
      • Custom script: set udg_Height = GetLocationZ(udg_Loc_YourUnit)
      • Camera - Set Player 1 (red)'s camera Height to (Height + 100.00) over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Loc_YourUnit)
I changed the trigger to english, sorry I have a spanish world editor.

Use GetLocationZ to get the height of your unit.

Loc_YourUnit is a Point Variable, Height is a Real variable, YourUnit is a Unit Variable.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
1st - Make a region around the bridge and when the hero is in it adjust the height to a good looking one.

2nd - Q: Is the bridge visible all the time ?
If not use evry 0.03 sec event with
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PoinOnTheMiddleOfTheBridge is visible to Player X Equal to True
    • Then - Actions
      • Adjust Cam to a good looking height for Player X
    • Else - Actions
      • Set Normal Cam height Player X
for action
This would work only if the hero sight range is bigger or equal to 1/2 bridge and has some other issues...
Edit//Might be repalced with hero is in XXXX distance from PointOnThe...//Endedit
Wont whrite the whole think you gotthe basic idea...

3rd - I think the best solution is playing a bit with alpha tile

Edit//Oh you already mentioned 3rd... I am prety sure you can fix the terrain with some doodads... maybe...
 
Status
Not open for further replies.
Top