• 🏆 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!

How to make a Camera always face the back of a unit

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
I have a trigger that I enable with a Text message event and made a camera with the view I want. I want the camera to always face the back of a unit from close when I type that message. That means whatever direction the unit faces, the camera to show from his back and point his facing direction all the time. If he turns left, the camera also from his back turning left to his facing, etc.

So far my created camera just gives me the view, it isn't behind the unit following it. I just didn't see the triggers that could do that.

Only prob would be, I may not see what's on the front cause of his back parts. But anyway, would be better than when he turns left to not see what he sees on the left. I'm just newb at cameras.
 
  • Trigger
  • Events
    • Player - Player 1 (Red) types a message containg -x as an exact match
    • Player - Player 2 (Blue) types a message containg -x as an exact match
    • Player - Player 3 (Teal) types a message containg -x as an exact match
    • Player - Player 4 (Purple) types a message containg -x as an exact match
    • ...
  • Conditions
  • Actions
    • Camera - Lock camera of (Triggering Player)to (Your unit)
    • Player - Add (Triggering Player) to CameraPlayers
    • Camera - Set (Triggering Player)'s Height Offset to 200 // This is the action Camera - Set Camera Field (Timed)
  • Trigger1
  • Events
    • Time - Every 0.03 seconds of game-time
  • Conditions
    • ((CameraPlayers) is empty) Equal to False
  • Actions
    • Player Group - Pick up every player in (CameraPlayers) and do (Actions)
      • Loop - Actions
        • Camera - Set (Picked Player)'s Rotation to (Facing of (your unit)) over 0.1 seconds // This is the action Camera - Set Camera Field (Timed)
CameraPlayers is "Player Group" variable.
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
The 2nd part with making the camera face the facing of my unit works but the first doesn't. The camera targets the unit from high above and is not stuck behind him. If I apply my camera object that has the view I want, it's fine but it doesn't follow my unit close from behind.
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Perfect! Just what I had in mind, as i was going to change units and select more than one. Good find
reputation_smallpos.gif
 
Status
Not open for further replies.
Top