• 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 Locked to a unit

Status
Not open for further replies.
Level 1
Joined
Jan 21, 2012
Messages
6
Hi there. I am busy making a map where there are invisible platforms quite high up in the air as a walkway for players to cross this gorge on my map. Anyway, what i wanted to do was lock the camera to triggering unit crossing over the gorge and stay on him, even at that height. But what its doing is following the unit and as it begins to cross on the invisible platform, it ignores that and drops straight to the ground while still following the unit.

If this is making sense, any at all, i would really appreciate help. Cos I actually want players to *SEE* their units crossing over the platform instead of just the ground every time the unit tries to cross. Thank you.

Here are 3 images to describe what im saying:
 

Attachments

  • First Pic.png
    First Pic.png
    1.2 MB · Views: 86
  • Second Pic.png
    Second Pic.png
    1.2 MB · Views: 82
  • Third Pic.png
    Third Pic.png
    1.1 MB · Views: 81
Level 5
Joined
Jul 18, 2010
Messages
159
I know that isn't the best option, i'm not advanced in camera systems but:

You can make a camera object that will target the walkway and trigger, that will move the camera every 0.1 secodns (or less) to position of your unit( mb this will work)
Know it sucks but if you will not get any other ideas you can try.
sry for english
 
Level 1
Joined
Jan 21, 2012
Messages
6
Thank you for your reply. It is much appreciated. but wont this cause some major memory leaks or some lag in my map?

Hmm... when "camera lock onto unit" is applied, it seems to lock onto the unit's feet or path where the actual ground is (not the invisible platforms).

Is there no way to lock onto a unit, but keep the camera a certain distance/height from the ground and let it stay there while the unit is moving?
 
Level 1
Joined
Jan 21, 2012
Messages
6
Ah-Ha? hmm... i don't know how to access the game's custom script code :/

but anyway, what do I do afterwards? And will it be possible to only set those settings just for a particular region? I.e Just for the fiery Gorge of Death?
 
What Bribe is saying is that you're going to have to use custom scripts in GUI like this:
  • Custom script: lol hi this is a custom script, you can add custom code here
You should be calling the function PanCameraToWithZ like this:

  • Set x = the x of the target you want
  • Set y = the y of the target you want
  • Set z = the z of the target you want
  • Custom script: call PanCameraToWithZ(udg_x, udg_y, udg_z)
 
Level 1
Joined
Jan 21, 2012
Messages
6
Oh maaan! I am really naab at this. Im sorry but i tried but to no avail :'(

I tried this with variables; x, y, and z, with all variable types "Camera Object" and initial value "- none -"

Am i at least on the right path?
 

Attachments

  • Custom script Pic.jpg
    Custom script Pic.jpg
    27.3 KB · Views: 56
Level 7
Joined
Apr 30, 2011
Messages
359
the variables' type are all 'real' . . .
each represents coordinates . . .
x and y = unit location
z = height

you should use a looping trigger to make the camera (looks like) locked into the unit . .
the loop should be around 0.01 - 0.05 . . .
assign each variables' value, then use that custom script . . .
 
Status
Not open for further replies.
Top