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

Camera trigger issue

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
I've made a few very simple camera triggers, and everything now works except for 1 small problem when I try to rotate the camera to a certain rotation angle. When the camera rotation angle gets between 90 and 270 degrees, the camera begins to shake rapidly while rotating. Even stranger is that this only happens to rotating the camera sideways. When changing the angle of attack the the same triggers, there are no problems at all. These are my triggers:

  • [NYI] Camera up on
    • Events
      • UI - Player 1 presses Up key Down with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[1] = true
  • [NYI] Camera up off
    • Events
      • UI - Player 1 presses Up key Up with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[1] = false
  • [NYI] Camera down on
    • Events
      • UI - Player 1 presses Down key Down with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[2] = true
  • [NYI] Camera down off
    • Events
      • UI - Player 1 presses Down key Up with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[2] = false
  • [NYI] Camera left on
    • Events
      • UI - Player 1 presses Left key Down with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[3] = true
  • [NYI] Camera left off
    • Events
      • UI - Player 1 presses Left key Up with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[3] = false
  • [NYI] Camera right on
    • Events
      • UI - Player 1 presses Right key Down with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[4] = true
  • [NYI] Camera right off
    • Events
      • UI - Player 1 presses Right key Up with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set Camera direction ON[4] = false
  • [NYI] Camera up
    • Events
      • Timer - Every 0.1 seconds of Real Time
    • Local Variables
    • Conditions
      • Camera direction ON[1] == true
    • Actions
      • Camera - Make the camera look at (Position of Marine [128.68, 98.51]) for player 1 over 0.1 seconds with 100% initial velocity, 0% deceleration
      • Variable - Set Camera angle = (Camera angle + 5.0)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Camera angle > 90.0
        • Then
          • Variable - Set Camera angle = 90.0
        • Else
      • Camera - Apply camera object Angle Of Attack Camera angle for player 1 over 0.1 seconds with 100% initial velocity and 0% deceleration
  • [NYI] Camera down
    • Events
      • Timer - Every 0.1 seconds of Real Time
    • Local Variables
    • Conditions
      • Camera direction ON[2] == true
    • Actions
      • Camera - Make the camera look at (Position of Marine [128.68, 98.51]) for player 1 over 0.1 seconds with 100% initial velocity, 0% deceleration
      • Variable - Set Camera angle = (Camera angle - 5.0)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Camera angle < 0.0
        • Then
          • Variable - Set Camera angle = 0.0
        • Else
      • Camera - Apply camera object Angle Of Attack Camera angle for player 1 over 0.1 seconds with 100% initial velocity and 0% deceleration
  • [NYI] Camera left
    • Events
      • Timer - Every 0.1 seconds of Real Time
    • Local Variables
    • Conditions
      • Camera direction ON[3] == true
    • Actions
      • Camera - Make the camera look at (Position of Marine [128.68, 98.51]) for player 1 over 0.1 seconds with 100% initial velocity, 0% deceleration
      • Variable - Set Camera rotation = (Camera rotation - 7.5)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Camera angle < 0.0
        • Then
          • Variable - Set Camera angle = (360.0 + Camera angle)
        • Else
      • Camera - Apply camera object Rotation Camera rotation for player 1 over 0.1 seconds with 100% initial velocity and 0% deceleration
  • [NYI] Camera right
    • Events
      • Timer - Every 0.1 seconds of Real Time
    • Local Variables
    • Conditions
      • Camera direction ON[4] == true
    • Actions
      • Camera - Make the camera look at (Position of Marine [128.68, 98.51]) for player 1 over 0.1 seconds with 100% initial velocity, 0% deceleration
      • Variable - Set Camera rotation = (Camera rotation + 7.5)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Camera angle > 360.0
        • Then
          • Variable - Set Camera angle = (Camera angle - 360.0)
        • Else
      • Camera - Apply camera object Rotation Camera rotation for player 1 over 0.1 seconds with 100% initial velocity and 0% deceleration
I've attached the map so everybody knows what exactly the problems are. You can type in CALL ROTATION (with or without capital letters) to check the rotation angle.
 

Attachments

  • Barrou Climate.SC2Map
    231.7 KB · Views: 104
Level 18
Joined
Aug 23, 2008
Messages
2,319
You're right. Very strange, because when Existing Velocity was turned on before it didn't made the camera move at all :S

Anyway, thanks for solving the problem and the tip on the directions (I was so busy trying to solve the problem that I didn't even notice they were turned around xD)

You've deserved your +rep :)
 
Status
Not open for further replies.
Top