• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need camera help PLS!

Status
Not open for further replies.
Level 3
Joined
Jan 30, 2005
Messages
38
ummmm, well youd have to make the angle update all the time. Since you dont want it locked, you just want it tracing the rotation of the unit then you should do:

( - I created a camera called CameraAnglesAim, which had my specified angles on it
- I created a unit, and set him to Unit1)

Events
Time - Every 0.10 seconds of game time

Conditions
(if you had any)

Actions
Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
Loop - Actions
Camera - Set (Picked player)'s camera Rotation to (Facing of Unit1) over 1.00 seconds
Camera - Set (Picked player)'s camera Distance to target to (Distance to target of CameraAnglesAim <gen>) over 0.00 seconds
Camera - Set (Picked player)'s camera Angle of attack to (Angle of attack of CameraAnglesAim <gen>) over 0.00 seconds
Camera - Set (Picked player)'s camera Field of view to (Field of view of CameraAnglesAim <gen>) over 0.00 seconds
Camera - Set (Picked player)'s camera Height Offset to (Field of view of CameraAnglesAim <gen>) over 0.00 seconds



So basically, every 0.1 seconds of the game, the camera will adjust angles in accordance with the unit chosen. But as you asked, it will not lock onto that unit.

The code above could be improved by only having the roation changing every 0.1 seconds, but i couldnt be bothered. GL HF!
 
Status
Not open for further replies.
Top