• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

3rd Person Camera?

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,184
Making one is VERY easy. However, making one easily also means that it's bugged.

Basically put the camera rotation to facing of unit u every X seconds. And pan the camera to the location of unit u. And.. that's it.

The bug mentioned is that the camera will go through buildings in certain situations.
 
Level 10
Joined
Oct 2, 2014
Messages
215
This is the trigger i used for a map i made, but as Chaosy said, i does go through buildings and such blinding your camera. (It does say First Person camera, but it really is a third person camera.)

  • First Person View
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (King Tarn 0082 <gen> is alive) Equal to True
        • Then - Actions
          • Camera - Set Player 1 (Red)'s camera Distance to target to 900.00 over 0.00 seconds
          • Camera - Lock camera target for Player 1 (Red) to King Tarn 0082 <gen>, offset by (0.00, 0.00) using Default rotation
          • Camera - Set Player 1 (Red)'s camera Angle of attack to 340.00 over 0.00 seconds
          • Camera - Set Player 1 (Red)'s camera Height Offset to 200.00 over 0.00 seconds
          • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of King Tarn 0082 <gen>) over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Sir Flen 0081 <gen> is alive) Equal to True
        • Then - Actions
          • Camera - Set Player 2 (Blue)'s camera Distance to target to 900.00 over 0.00 seconds
          • Camera - Lock camera target for Player 2 (Blue) to Sir Flen 0081 <gen>, offset by (0.00, 0.00) using Default rotation
          • Camera - Set Player 2 (Blue)'s camera Angle of attack to 340.00 over 0.00 seconds
          • Camera - Set Player 2 (Blue)'s camera Height Offset to 200.00 over 0.00 seconds
          • Camera - Set Player 2 (Blue)'s camera Rotation to (Facing of Sir Flen 0081 <gen>) over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Sir Cener 0083 <gen> is alive) Equal to True
        • Then - Actions
          • Camera - Set Player 3 (Teal)'s camera Distance to target to 900.00 over 0.00 seconds
          • Camera - Lock camera target for Player 3 (Teal) to Sir Cener 0083 <gen>, offset by (0.00, 0.00) using Default rotation
          • Camera - Set Player 3 (Teal)'s camera Angle of attack to 340.00 over 0.00 seconds
          • Camera - Set Player 3 (Teal)'s camera Height Offset to 200.00 over 0.00 seconds
          • Camera - Set Player 3 (Teal)'s camera Rotation to (Facing of Sir Cener 0083 <gen>) over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (King Danar 0084 <gen> is alive) Equal to True
        • Then - Actions
          • Camera - Set Player 4 (Purple)'s camera Distance to target to 900.00 over 0.00 seconds
          • Camera - Lock camera target for Player 4 (Purple) to King Danar 0084 <gen>, offset by (0.00, 0.00) using Default rotation
          • Camera - Set Player 4 (Purple)'s camera Angle of attack to 340.00 over 0.00 seconds
          • Camera - Set Player 4 (Purple)'s camera Height Offset to 200.00 over 0.00 seconds
          • Camera - Set Player 4 (Purple)'s camera Rotation to (Facing of King Danar 0084 <gen>) over 0.00 seconds
        • Else - Actions
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,184
That's a tad more complicated to answer. I think you know how to do the movement?

Anyway, the visual trick is to use SetUnitX and SetUnitY because those doesn't interrupt any orders so you can play the walk animation with triggers. Then you just do the movement with the press key events. I am somewhat sure that using the GUI action for moving will interrupt the animation.

Speaking about the 'bug'

http://www.hiveworkshop.com/forums/...&order=DESC&search=third%20person&d=list&r=20

That system somehow works around that.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Third person cameras are a lot harder to do than one might first think. Especially if you are used to those from games like TES Oblivion or Xenoblades.

The main problem is preventing them clipping inside objects which is usually ugly and can even render the player blind as to what is happening. You might need all kinds of camera help meta-data for the terrain to prevent this from happening.
 
Status
Not open for further replies.
Top