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.
[12:24 pm]
Oh_Man -- arty's done another vid. he's also announced he's going to organise showmatches with pro, with NO maphacks, so we can see its actual capabilities
[10:09 am]
NimoStar -- It can by playing the same map thousands of times. It is similar to AI speedrunning games
[02:30 am]
Symmetry -- I dreamed about that as a kid. The idea of a computer capable of analyzing a starcraft map and calculating the fastest possible way to hit the victory condition
[02:29 am]
Symmetry -- But can AI beat my custom maps?
[2026-9-22. : 12:32 pm]
Oh_Man -- yea APM vs eAPM
[2026-9-22. : 8:48 am]
NimoStar -- plus most of the human APM is just spam clicking APM inflation
[2026-9-22. : 8:47 am]
NimoStar -- the thing with the "*12" thing is completely misleading. The AI isn't using two control groups, it can use each of those actions to command a single unit individually and issue different commands to each single unit.
[2026-9-22. : 8:06 am]
NudeRaider -- NudeRaider
NudeRaider shouted: Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
*Pluto's wraiths
[2026-9-22. : 8:05 am]
NudeRaider -- Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
Please log in to shout.


Members Online: Zoan, Oh_Man