Staredit Network > Forums > SC2 Assistance > Topic: Rotatable Camera Retaining w/ Mouse Movement
Rotatable Camera Retaining w/ Mouse Movement
Dec 9 2010, 3:30 am
By: Joker47  

Dec 9 2010, 3:30 am Joker47 Post #1



I am attempting to make a lagless third person click to move camera. I was able to do it perfectly with a right-click detection trigger, but that is still user a server-side operation.

So, you can easily have a rotatable camera following a unit using these 2 camera triggers:
-"Lock camera mouse relative mode On for player"
-"Turn camera mouse rotation On for player"

However, when you" lock camera mouse relative" (first one) you lose the ability to click to move. What I want to do is be able to click to move at the cross-hair centered on the screen. Is there a way to have a similar camera effect without losing my ability to click to move? Is it possible to modify the "CameraForceMouseRelative()" function so it doesn't disable movement?



None.

Dec 10 2010, 12:46 am Roy Post #2

An artist's depiction of an Extended Unit Death

CameraForceMouseRelative() is part of the native library of Galaxy, and cannot simply be modified. In theory, you could write your own custom script that does what CameraForceMouseRelative() does and exclude the disabling of the mouse, but I don't know how you would access the code inside of the CameraForceMouseRelative() function to see exactly what it does.

The clearest way to replicate the effect of this function while keeping the mouse fully enabled would be to change the camera target for the current player to be focused on the player's mouse position. However, there is no way to get the mouse position of a player without firing a Mouse Clicked event, which not only doesn't work for your case, but it would not solve the lagless problem, either.

So, unless a script can be written for a relative lock without disabling the mouse, or if Blizzard adds a function to retrieve the current position of a player's mouse (I suppose ignoring the z-axis), your problem isn't solvable.




Dec 12 2010, 3:51 am Joker47 Post #3



Yeah.. the more I thought about it, the more I thought it would not be possible. I wish that blizzard included the source code to their functions... I would imagine it would be pretty easy to modify what they already made. I suppose I can try my current mouse system using traceline and right-click detection, the lag should be lower with more players since it only has to detect one button rather than testing WASD for each player. Thanks for the help.



None.

Jan 13 2011, 7:27 pm Joker47 Post #4



As of update 2.1 lock camera no longer disables mouse movement. This is now very simple. If anyone is interested/unsure how to do this I could most a post about it in SC2 Theory.



None.

Jan 13 2011, 8:47 pm payne Post #5

:payne:

So this means we can prevent players from using the mouse-wheel to ruin the camera settings of our 3rd Person View games with Lock Camera while allowing them to rotate the screen with mouse movement? :O



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:47 pm]
Ultraviolet -- zsnakezz
zsnakezz shouted: ultra you have any thought or notes on undead invasion?
I still haven't gotten a chance to play it yet unfortunately. I just downloaded, but today I'm working on a project with a deadline so won't be able to play it today
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
Please log in to shout.


Members Online: Roy