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

[Solved] Apply and lock camera object

Status
Not open for further replies.
Level 3
Joined
Feb 20, 2015
Messages
39
I did not remember how i did it,and its driving me nuts...Trigger in which where i apply camera object and locks it...how do i do it?


Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Animate Dead
Actions
Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds

It does apply the camera but i doesnt lock on it(i can side scroll freely)
(basically im making ability to choose hero)
 
Level 3
Joined
Feb 20, 2015
Messages
39
Have you tried the Camera - Lock Camera Target To Unit function?

  • Camera - Lock camera target for WhichPlayer to WhichUnit, offset by (Real1, Real2) using Default rotation
Also, make sure to use post your triggers inside [trigger][/trigger] tags.
No this is not how i want it to work,what i need is to apply camera object and locks my view using the camera object it,i did it once but i did not remember how to do it..i did manage to apply the camera object BUT it did not lock on it...
 
Level 13
Joined
Mar 29, 2012
Messages
530
You can just use an invisible dummy.

  • Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds
  • Unit - Create 1 Invisible Dummy for Neutral Passive at (Target of current camera view) facing 0.00 degrees
  • Camera - Lock camera target for Player 1 (Red) to (Last created unit), offset by (0.00, 0.00) using Default rotation
 
Level 3
Joined
Feb 20, 2015
Messages
39
Nvm I fixed it myself...but thanks for helping anyway

  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Trigger - Turn on Untitled Trigger 002 <gen>


  • Untitled Trigger 002
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds
 
Level 13
Joined
Mar 29, 2012
Messages
530
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Trigger - Turn on Untitled Trigger 002 <gen>


  • Untitled Trigger 002
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds
Doing like that is risky and can drop FPS drastically, IMO.
Furthermore, the camera can still shake which looks buggy.
 
Status
Not open for further replies.
Top