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

Adjust camera angle to match unit... help?

Status
Not open for further replies.
Level 3
Joined
Nov 11, 2007
Messages
50
I'm trying to adjust the camera angle to match the same angle as a unit, normally, this wouldn't be bad, if it weren't for a few small restrictions. The camera is locked to the unit, I want the camera to rotate around the unit as the unit turns. With what I can find in GUI, there is no way to refer to the camera's current rotation, or simply say "Set cam rotation to #" only "Rotate camera by #"

If someone could tell me what I'm doing wrong and help me fix the problem in GUI, I would be VERY thankful.

If someone could simply give me a JASS script to set cam rotation to the same as the unit rotation, that should work just as well.
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Maybe you could add this trigger:

Code:
Event - Every 0.1 seconds
Condition - /
Action - Camera - Lock camera target for Player 1 (Red) to (Triggering unit), offset by (0.00, 0.00) using The unit's rotation
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Here's a camera lock trigger which locks the camera to a 3rd person perspective.
Just change the desired actions to the values you want for your camera
  • kamera
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Aktionen
      • Camera - Change camera smoothing factor to 1.00
      • Camera - Lock camera target for Player x to *your unit*, offset by (0.00, 0.00) using a unit's rotation
      • Camera - Set Player x's camera rotation to (Facing of *Your unit*) over 0.25 seconds
      • Camera - Set Player x's camera perspective to 350.00 over 0.00 seconds
      • Camera - Set Player x's camera Distance to target to 550.00 over 0.00 seconds
      • Camera - Set Player x's camera sight to 200.00 over 0.00 seconds
      • Camera - Set Player x's camera height-offset to 20.00 over 0.00 seconds
And no, it's not mui. If you want it mui, tell me ^^
 
Level 3
Joined
Nov 11, 2007
Messages
50
Yea, thanks Squiggy. Thats what I found last night shortly after I posted here on the forum. I tried posting my discovery 3 times though, and each time the forum become unresponsive, even though I could go to any other website just fine.

Edit:
Yay! it let me post :D
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Yes.
Having them will lock the cam to a certain position behind the unit.
Without them the cam will move with the unit, but you can for example use the scroll to adjust the angle of attack of the camera.
It is your choice I just want to give it to you.
 
Level 3
Joined
Nov 11, 2007
Messages
50
Actually, I would prefer to have the cam locked down like his trigger would indicate. But I've noticed that moving the scroll wheel reverts it to normal. Any way to disable the scroll wheel?
 
Level 3
Joined
Nov 11, 2007
Messages
50
Doh! Correct, there were just a couple functions that I only needed done once, unless someone adjust the camera back. Didn't think to just have them repeat aswell.
 
Status
Not open for further replies.
Top