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

Need help with 3rd person Camera

Level 12
Joined
Oct 28, 2019
Messages
478
Hi, I need improve this camera system i´ve copy from other map, its work nice, but when my hero enter a dungeon (with cliffs) the camera fails, it rises, so I need make other DG camera.... I would like to know if is possible use only one camera system for entire game

  • CameraP2
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Region - Center Camera <gen> on (Position of HeroVariable)
      • Camera - Pan camera for Player 2 (Blue) to (Center of Camera <gen>) with height 75.00 above the terrain over 0.00 seconds
      • Camera - Set Player 2 (Blue)'s camera Rotation to (Facing of HeroVariable) over 0.40 seconds
      • Camera - Set Player 2 (Blue)'s camera Angle of attack to 335.00 over 0.00 seconds
      • Camera - Set Player 2 (Blue)'s camera Field of view to 1000000000.00 over 0.50 seconds
      • Camera - Set Player 2 (Blue)'s camera Distance to target to 400.00 over 0.00 seconds
      • Camera - Set Player 2 (Blue)'s camera Height Offset to 75.00 over 0.00 seconds
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,570
Use Real variables for the different settings and adjust them whenever you enter a dungeon or some new terrain:
  • Actions
    • Set Variable TempPoint = (Position of HeroVariable)
    • Region - Center Camera <gen> on TempPoint
    • Camera - Pan camera for Player 2 (Blue) to TempPoint with height CamHeight above the terrain over 0.00 seconds
    • Camera - Set Player 2 (Blue)'s camera Rotation to (Facing of HeroVariable) over 0.40 seconds
    • Camera - Set Player 2 (Blue)'s camera Angle of attack to CamAttackAngle over 0.00 seconds
    • Camera - Set Player 2 (Blue)'s camera Field of view to 1000000000.00 over 0.50 seconds
    • Camera - Set Player 2 (Blue)'s camera Distance to target to CamDistance over 0.00 seconds
    • Camera - Set Player 2 (Blue)'s camera Height Offset to CamHeightOffset over 0.00 seconds
    • Custom script: call RemoveLocation( udg_TempPoint)
Also, you should definitely fix the memory leaks, you're leaking 200 Points per second at the moment.

A unit enters the dungeon:
  • Actions
    • Set Variable CamHeight = 0.00
    • Set Variable CamHeightOffset = 0.00
Play around with the different settings to get what you're looking for.

Also:
There's the Lock Camera option which can be useful since you could lock it to your HeroVariable unit and avoid the whole panning stuff.

If your map is multiplayer then you can use Arrays for the Reals/HeroVariable and a Player Group / Loop setup to have this single trigger work for everyone.
 
Last edited:
Top