Camera: Odd Function, Help?

Soup

New Member
Reaction score
0
In short, I wish to pin a unit to a camera's position, namely the camera of a player. Yes, a unit to a camera, not the other way. So really, I want a unit to always be in the center of the screen, rather than the screen always focussed on a unit. Anglewise i'd want the unit to face a single direction the whole time, and simply always be where the camera is pointing.

Is this possible, and if so could I recieve some help with it, as I'm not sure how to go about it.

Thanks in advance, Soup.

_____________________________________________________________________
(On a note, I wish to make the unit unseen and probably of negative size to be under the terrain so I can apply an image effect via aura. In effect, to put an image under the terrain to act as a skybox (except not on the sides) so it can be viewed through water through an alpha tile. If you don't understand what i'm on about don't worry, if you understand and can think of a cleaner/easier way to do this input would be appreciated.)
Objective.jpg
Either way a camera function would be great.

-Soup
 

Soup

New Member
Reaction score
0
Alright, i've got a basic trigger that I managed to whip together. It's barely choppy, so I might look into using a timer system to make is smoother if possible. If any revision is needed i'd appreciate the help.

Code:
Camera Attach
    Events
        Map initialization
    Conditions
    Actions
        Unit - Create 1 Footman for Player 1 (Red) at (Target of (Current camera)) facing (Center of (Playable map area))
        Set Player1CamUnit = (Last created unit)
        Trigger - Turn on Untitled Trigger 001 <gen>

Code:
Untitled Trigger 001
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit - Move Player1CamUnit instantly to (Target of current camera view), facing Default building facing (270.0) degrees

From the information on the function of Target of current camera view, I think there be a major leak there unless I attach a variable that's destroyed each time. Is that right or is it fine?
 

Soup

New Member
Reaction score
0
So a friend brings to surface an issue with such a trigger, with the camera being a local thing and such, making it desync like shit when using what I did. So, we've been tossing around the idea of using JASS to make an image and perhaps put that under terrain, being that an image can apply to a client so it'll go smoothly with the camera. Any ideas?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top