• 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 climbs up cliffs when following a unit

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2013
Messages
23
I use OneTwoSC's system to make a unit follow a unit from behind. The thing is, when the unit goes close to the cliffs, the camera climbs up and does not follow the unit from behind and you don't see what's in front of the unit like that, since the camera is somewhere above...

is there a way to make the camera ignore the terrain or so that it will go through cliffs when following unit, like the camera goes through doodads when following the unit? It's been a problem I was not able to solve, for years.

You can try this map here to see what I am talking.
 
Level 2
Joined
Jul 23, 2013
Messages
23
What do you mean?

Currently I have a case where I read height, I have a unit that has to climb up and down cliffs like the reaper is doing, except the unit can climb regardless of the height (reapers climb one one cliff level, you cannot climb two levels afair). So I just tick the flag to 'Ignore Height' - the unit falls below the ground, I think goes to 0 height since when you create a map you start e.g at height 8 and Ignore Height would put the unit at Height 0 which is below the terrain.

I fix that by using a trigger and this is the one that reads height - Change Unit Height to (Height of terrain) or something like that, the unit always stayed on the surface.

For cameras, I don't see how this can be ignored, the camera cannot ignore the height to go through cliffs.
 
Level 2
Joined
Jul 23, 2013
Messages
23
Do you have any trigger examples for this or with the map I linked? Theorizing isn't actually going to do much. For example, what would be the condition to detect whether a camera is next to a cliff or not or other condition based on which to set its Z offset via trigger action?
 
Level 2
Joined
Jul 23, 2013
Messages
23
I found a solution and maybe for good. With the data editor it was only a partial one but that was still a big progress since I couldn't do even that these years. In Default Camera, the value UI: Height Map. When set to Camera rather than Air, the Camera always follows the unit and doesn't change its height even when close to the cliff. This is a wonderful solution to never get the camera go off the unit if your unit is on the same cliff level and doesn't change cliff level. However, this kind of locks the camera into the same level, so if your unit goes up a cliff platform, the camera won't follow the unit on the surface and will cut through the cliff rather than climbing on it, so you won't see your unit above. Height Displacement did nothing, overall for a single map I find it perfect solution but most of the maps would require cliff climb, so locking the camera won't do.

What could be the final solution is a trigger that didn't work for me in the past.

  • Camera - Turn camera height smoothing Off for player (Owner of FIREBAT)
It didn't work because I set this in Map Initialization and with the triggers I use it is crucial that this action be added in RPG Vision trigger after Apply Camera Object, Lock Camera and Follow Player have been executed. So far it seems to work perfectly.
 
Last edited:
Status
Not open for further replies.
Top