• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Camera rotation

Status
Not open for further replies.
Level 1
Joined
Apr 22, 2014
Messages
2
Hello! I am new to the forum. I've got info here in the past, but I never posted before. I hope I don't make any mistakes :).

My map is a square, with four players, each one located in one side. I would like to change the angle of the camera, so that each player "sees the world" as if he or she was in the bottom side of the square. Currently, only the camera of the player located at that position is right - other players' cameras have the same orientation, which is wrong.

I have tried to modify camera fields directly in triggers, and to use camera objects, but I haven't succeeded. The camera either does not change at all, or does "weird" things (stutters when I rotate it in-game).

How can the camera be rotated, so that it faces what each player faces?

If I haven't been clear, please, feel free to ask, and I'll try to clarificate. For what it's worth, I've submitted the map. Thanks, regards!
 

Attachments

  • SecretGarden.w3x
    282.3 KB · Views: 91
Level 12
Joined
Mar 13, 2012
Messages
1,121
A very well asked first question!

There is a GUI function for this but if you want to lock the camera in this angle you have to repeatedly call the function, because if a player changes one of the angles of the camera on his own it will snap back to default rotation after that.

  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Camera - Set Player 1 (Red)'s camera Rotation to 0.00 over 0.00 seconds
This function can be found in "Camera - Set Camera Field (Timed)".

If the camera should be completely fixed, you can try the "Camera - Lock Camera..." functions and lock the camera to a certain unit or dummy unit. This does not need repeated execution.

Also if you have further question just ask away.
 
Level 1
Joined
Apr 22, 2014
Messages
2
Thank you, Ezekiel! I finally got it working with the loop approach. However, I had to set "Fixed Start Location", under "Scenario/Player Properties...", for all players, because, otherwise, they could have appeared at any of the four locations, thus making it impossible to set angles correctly (just if someone has the same problem; it kept me thinking quite some time).

However, now that it works, I think it could be made smarter. Perhaps players could have the power to rotate the camera, which would make it more comfortable, e.g., when assaulting the locations at the left and the right. I'll have a look at camera systems, as proposed by deathismyfriend, and see what I can get.

I fear you've been faster than I imagined, though. I'll work on it as soon as I can, and post the results afterwards.

Thanks a lot, and thanks for your friendliness!
 
Status
Not open for further replies.
Top