Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 645

Get current angle of rotor

$
0
0
Hello Coders!

Getting the current angle of a rotors is something that has been somewhat of a problem for me. Because of this i set out to create a simple piece of code that could get said angle.

Below you will find some code that gets the current angle of the rotor.

Code:
void Main() 
{ 
var rotorStator = GridTerminalSystem.GetBlockWithName("Rotor") as IMyMotorStator;  

string info = rotorStator.DetailedInfo;

string CAngString = System.Text.RegularExpressions.Regex.Replace(info,...
Get current angle of rotor

Viewing all articles
Browse latest Browse all 645

Trending Articles