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 Spirit-X

When I sat down to do this one, I honestly thought it would be quite a simple task...and I still suspect that maybe it is and I'm just missing something a bit obvious.

Let's say I've got a floating UFO, just hovering above the ground. All I want to do is to get it to rotate around it's own 'local' Y axis (so cannot use Rocket Rotator, must be local rotation) until it's facing whatever direction my left stick is pointed in.

I'm getting the left stick output from page 2 of the Controller Sensor (so up on the stick is always away from camera for example) as I want the UFO to have camera relative control.

I know how to use rotators and stuff but can't figure out the easiest way of getting it to recognise when it's facing the direction I am pushing on the stick.

I noticed that a puppet has a 'Turn To Face' input, anyone know how the logic for that might work exactly?

All I can really think of at the moment is that maybe I need to dust off the old maths book and treat it as a vector problem, using the X and Y values from the stick to figure out the direction and then somehow try to equate that with Scene Space Direction. But that seems veeeeery long winded for something that feels like it should be pretty straight forward. ( I already ended up with what felt like way too much logic just trying to figure out if it should start turning left or right based on it's current direction!)

Any help with this would be much appreciated!

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