Insanewarlock
Active Member
- Reaction score
- 2
I need the camera height offset to change when player walks up a mountain my third person map. How do I do set my HeightVar to the Z coordinate of the unit/hero?
call SetCameraZ(GetEnumPlayer(), udg_playerCameraZ[GetConvertedPlayerId(GetEnumPlayer())]+128)
set udg_SomeReal = GetLocationX(udg_SomePoint)
Set Unit_Point = (Position of Unit)
Custom script: set udg_Unit_Height = GetLocationX(udg_Unit_Point)
Camera - Set Player 1 (Red)'s camera Height Offset to (Unit_Height+130.00) over 0.1 seconds.
Trigger
Events
Player - Player 1 (Red) selects a unit
Conditions
Actions
Set Point = (Position of (Triggering unit))
Custom script: set udg_Real = GetLocationZ(udg_Point)
Game - Display to (All players) the text: (String(Real))
Yes, yes!I think you are talking about the cliffs.
I don't seem to understand you, what is the cliff level of the unit?take the cliff level of the unit into consideration
unitLoc = position of unit
camLoc = unitLoc offset by CAM_DISTANCE towards (CAM_ANGLE - 180) degres
cliffLvl = get cliff level at camLoc
unitZ = get location Z for unitLoc
camZ = CAM_HEIGHT_FIX + unitZ - (cliffLvl * 128)