Skip to main content

Report this content

We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.

Note that misuse of the reporting tool will not be tolerated.

Item being reported:

A forum post by Mm Bogdan & Matt

Hi,
the most robust solution is probably to use a bit of vector maths.

First thing you need is a vector that points along the direction of your aircraft's nose. You can get this by placing a movement sensor on the aircraft, set "Local Space" on, and align the X Direction (the white arrow with X on it) along the aircraft's nose.

Next thing you want to do is a "Vector Dot Product" with a vector that represents the direction of gravity. This will essentially get you a number that is 1 when the nose points directly down, -1 when the nose points directly up and 0 when the nose is level with the horizon. Luckily the dot product in this special case is simply the Y component of the aircraft nose vector multiplied by -1. So you just need to add a splitter to the X Direction output of the movement sensor, take the Y component from the splitter and multiply it by -1. Obviously you can forgo the multiply by -1 and just take into account the result will be inverted.

Hope that helps
Matt

Oh dear! Your browser is either unsupported or there has been a problem loading the page.