Space Engineers

Space Engineers

Not enough ratings
GAC - rich_27's Gravity Aligned Camera Script
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.902 KB
12 Mar, 2018 @ 7:17am
19 Mar, 2018 @ 10:00am
2 Change Notes ( view )

Subscribe to download
GAC - rich_27's Gravity Aligned Camera Script

Description
Version: 1.1 Date: 19-Mar-18

DESCRIPTION:
The script orients a sub-grid so that the detected camera is aligned to gravity.

WHAT IT DOES:
The script detects a single camera, and controls two (or three) rotors to orient the camera's
forward vector with respect to gravity. If using three, it can align the camera's up vector with
a saved vector.

HOW TO USE IT:
1. Create a grid with a camera mounted on a pair (or trio) of rotors set up in a traditional
gimbal fashion. If using three rotors, the innermost one must control the yaw of the camera.

2. Add a programmable block and load this script from the workshop.

3. Adjust 'alignmentSpeed' to change how fast the camera aligns to gravity.

4. (Optional) If using a camera yaw rotor, run the programmable block from the terminal to set the
current camera up direction for camera yaw. The script will then use that rotor to align the
camera to that vector.

CHANGELOG:
v1.0, 12-Mar-2018
- Initial release
v1.1, 19-Mar-2018
- Added support for a third rotor and control of camera yaw
7 Comments
TW1STEDKINGZ 22 Sep, 2020 @ 10:10pm 
Hi, Is there any way to get the script to pick out one camera on a grid with other down facing camera's?
Spychotic 19 Mar, 2020 @ 8:53am 
Hi, I am trying out this script, but it keeps returning an error; "Error: Ship controller". I can't figure out what is wrong. Can anyone give me any guidance?

Regards, Spike
Hirnsausen 11 Jul, 2019 @ 2:01am 
Splitsie mentioned in his Youtube videos your useful script.
But there is one more script we would need:
Gravity-Aligned Ship Script.
I would love to create such a script by myself but lack the knowledge. Thus i have two requests and hope you can make one of those two possible:
- if convenient for you to write that script
- or to let me see the script code for your GAC and I will try to develop the GAS scropt
I would need information, how to write mods for Space Engineers, though.
abuseJUNKEY 24 Apr, 2019 @ 10:00pm 
I'm no expert but it looks like it takes a minimum of two rotors
Malacanth 27 Mar, 2019 @ 9:00pm 
Do I need to tag the rotors anything, I just want it to align using one rotor, but I just get an error of no perpendicular rotor.
rich_27  [author] 23 Mar, 2018 @ 7:26am 
Pleasure :)
_SD_ 22 Mar, 2018 @ 2:43am 
Nice thanks man!