• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Camera Help!

Status
Not open for further replies.
Level 2
Joined
Aug 4, 2009
Messages
8
Im trying to make a 3rd person camera that is fixed behind the controlled character but im completely lost with the whole camera thing, so if anyone can show me a trigger for it or point me in the right direction to find out how id really appreciate it :grin:
 

AK-

AK-

Level 1
Joined
Aug 25, 2009
Messages
3
Need camera ???

The easiest way to make a 3rd person camera is as the following


Create a new camera and new unit (for camera to follow) and position the camera in a desirable place behind your new unit.


now enter the trigger editor and make a new trigger that looks like the following


//========================================================

Events
Time - every 0.01 seconds of game time
Conditions
(none)
Actions
Camera - apply ( THE CAMERA YOU CREATED ) <gen> for ( PLAYER OF CHOICE ) over 0.00 seconds
Camera - Lock camera target for ( PLAYER OF CHOICE ) to (UNIT OF CHOICE) <gen>, offset by (0.00, 0.00) using the units rotation
Camera - Set (PLAYER OF CHOICE) camera Rotation to (facing of UNIT OF CHOICE <gen> ) over 0.00 seconds

//========================================================

This is a relatively simple 3RD person camera, though you can add delays and things on to the script with ease
 
Level 4
Joined
Jul 15, 2009
Messages
29
Okay. 0.01 game time is effective, but not necessary. Create two triggers, one called "Initialization" and one called "Player's Camera".

Initialization:

  • Events - Map Initialization
  • Conditions -
  • Actions - start (Your Timer) as a repeating timer that will expire in 0.10 seconds
Now for Player's Camera:

  • Events - (Your Timer) expires
  • Conditions - if(YourUnit) is alive = true
  • Actions - Pick Every Player in All Players and do actions:
    • Lock Picked Player's Camera to (Their unit)
    • Set Picked Player's Distance to Target to 700
    • Set Picked Player's Angle of Attack to 340 over 0.5 seconds
    • Set Picked Player's Camera Rotation to (Facing of (Your Unit)) over 0.25 seconds
The problem with this is that the camera won't up and down with your unit. So create a "real" variable, not array, named Z_Unit and a "point" variable, not array, named Position_Unit

Now change your Player's Camera trigger to this:
  • Events - (Your Timer) expires
  • Conditions - if(YourUnit) is alive = true
  • Actions - Pick Every Player in All Players and do actions:
    • Set Position_Unit = (Position of (Your Unit))
    • Custom script: set udg_Z_Unit=GetLocationZ(udg_Position_Unit)
    • Lock Picked Player's Camera to (Their unit)
    • Set Picked Player's Distance to Target to 700
    • Set Picked Player's Angle of Attack to 340 over 0.5 seconds
    • Set Picked Player's Camera Rotation to (Facing of (Your Unit)) over 0.25 seconds
    • Set Picked Player's Height offset to 100 + Z_Unit over 0.25 seconds.
    • Custom script: call RemoveLocation (udg_Position_Unit)
Now you have a fully operational 3rd person camera. To make it a first person, just set the Distance to target to zero and set the field of view to 30.

----------------------------
Give reps where we earn them!
 
Status
Not open for further replies.
Top