Keep Camera Rotation Mod [Spaar`s Modloader BETA]

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#1
EDIT: The mod is now updated to Spaar's modloader BETA. I also added 2 commands to make it a little better to use: (ctrl+k to open the console, then enter the command)
ToggleKeepCameraRotation ("to" [tab] [enter] for quick access), which toggles whether or not the mod is active.
FlipOnOtherAxisInstead ("fl" [tab] [enter] for quick access), which makes uses a different vector to calculate the forward direction.

If you focus on an object (mouse wheel), the camera will keep the same rotation in comparison to the object :D

Just install Spaar's Modloader, then put the attachment in the "Mods" folder.

Old versions:
Works, but can create an offset:
http://forum.spiderlinggames.co.uk/f...fetch?id=19204
Working, but can rotate the camera 90 degrees
http://forum.spiderlinggames.co.uk/f...fetch?id=18329
Working, but has a lot of glitches (some of the ones in the version above are fixed though)
http://forum.spiderlinggames.co.uk/f...fetch?id=18630

Not sure how well this works:
http://forum.spiderlinggames.co.uk/f...fetch?id=17997
Creates an offset every time it rotates:
http://forum.spiderlinggames.co.uk/f...fetch?id=18013

This dll works perfectly, you can even select target before you start the simulation:

Attached Files
RotateCameraMod.dll
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#6
Deptune said:
quite good! thanks for your brilliant mod! Jet players will appreciate for this !
It might spaz out a little of you try to take loops
 
#7
I downloaded this to check out and it seems to work better for ground based vehicles. On my PC, which is fairly new, when flying the camera becomes a little jerky and in long turns it tends to loose its angle on the device. If you put on the "Smooth Camera" option in settings it really helps out with the way it snaps its angle back to the selected block, but it seems like the angle goes out quicker like that. Overall I like the mod, I'm going to use it with my Chinook right now, I bet that will rock
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#8
UrSubconscious said:
I downloaded this to check out and it seems to work better for ground based vehicles. On my PC, which is fairly new, when flying the camera becomes a little jerky and in long turns it tends to loose its angle on the device. If you put on the "Smooth Camera" option in settings it really helps out with the way it snaps its angle back to the selected block, but it seems like the angle goes out quicker like that. Overall I like the mod, I'm going to use it with my Chinook right now, I bet that will rock
Do you think you can post the .bsg you tried it with? It seems to not do detecting which side is up correctly, and I don't really have anything to test with
 

ZiMMy

New Member
#9
I think that's because there's a smoothing of the camera. You could try changing different variables responsible for this in MouseOrbit.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#10
No, it can rotate 360 and 90 degrees completely fine.
It has to do with how it changes which direction is up whenever it's tilted more than 90 degrees.
So it goes 89 => .z = 90, 90 => .z = 0, 89 (91) => .z = 270
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#13
Yeah, I didn't manage to fix that :(
I explained more of why Besiege has this error in the suggestion thread
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#14
Okay, uploaded the semi-fixed version.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#15
Wops, forgot to remove the GUI I used for testing, and for some reason it won't let me edit the post, so here's the file:

Attached Files
FocusCamera.dll
 
#17
I've never done any programming with Unity or C#, but would it be possible to make the camera reinitialise at certain angles so that 'up' for it is in a different direction? That way it might manage to avoid special cases such as when a machine points straight upwards, which may simplify the logic side of things so that the issue is clearer, and may fix the camera glitchiness for when a machine points straight upwards (though, thinking about it, this may cause performance issues if a machine rotates too quickly). Of course, this may make no sense and/or be complete gibberish. As I said earlier, I've never used Unity or C#.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#18
Well I originally had a thingy that did that, but then I realized that Unity does that automatically.

And that's actually the cause of the whole problem :/
 
#19
Hmm. Maybe the MouseOrbit needs updating sometimes? It looks like it's only updated if it's null, but, based on what you just said, it may need to be updated if it's different to what the Camera's MouseOrbit is. Of course, I could easily be completely wrong, but...
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#20
Made a version that get's rid of the flipping problem, but replaces it with a different one: Only acute angles.
trying to check for negative "transform.rotation.y"s makes it work-ish, but it creates an offset every time.
http://pastebin.com/MnkzRGLG

Attached Files
FocusCamera.dll
 
Top