Stormworks: Build and Rescue

Stormworks: Build and Rescue

Nincs elegendő értékelés
Logic - World coordinates to Vehicle coordinates
   
Díjazás
Kedvenc
Kedvenc
Törlés
Címkék: v0.3.6
Fájlméret:
Közzétéve:
Frissítve:
34.102 KB
2018. aug. 7., 11:03
2018. aug. 20., 2:11
3 változásjegyzék ( megnézés )

Feliratkozás a letöltéshez
Logic - World coordinates to Vehicle coordinates

1 Tajin készítette gyűjteményben
Logic Examples & Knowhow
54 elem
Leírás
Simple logic for converting normal coordinates into vehicle coordinates.
> so basically a coordinate system that is centered and oriented to your vehicle
X+ = right
Y+ = front


By itself this doesn't do a lot but it makes working with gps coordinates and trigonometry a whole lot easier.
So instead of working with your target coordinates directly, convert them to vehicle space first and you'll need less logic for whatever you're doing with those coordinates next.


You could even use this to make a simple but effective autopilot just by feeding the X coordinates into a pid with a 0 setpoint. The pid will steer towards making X = 0, which means you're pointing right at your target and Y becomes the distance to it.


- - - - -

Update:
I've now also included the inverse equation for this. The black box calculates the object coordinates and the white box uses those values and converts them back into the original coordinates.
1 megjegyzés
SamuelPepys 2018. aug. 7., 16:58 
Will test it, seems very useful!