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.
[03:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[04:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[04:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[04:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[04:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
[03:57 am]
Sylph-Of-Space -- Unless I'm dum (possible)
[03:57 am]
Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
[03:53 am]
Sylph-Of-Space -- :'( dont cry for me cat-gentina
[09:18 pm]
Ultraviolet -- 🔪🐈
[2024-5-19. : 12:34 pm]
NudeRaider -- curiosity kills the cat!
Please log in to shout.


Members Online: Sylph-Of-Space, Roy, Excalibur