Forum rules - please read before posting.

[Solved] Rotate object by formula

MACMAC
edited February 2018 in Technical Q&A
Hallo there,

I have a puzzle in my game that contains a wheel that has to be rotated one time on game startup by a random amount. I have an integer variable (Var:221 with values 0 to 7) which gets randomized on game startup and all the puzzeling bits are calculated based on that variable.
But I don't know how to rotate the 3D object (wheel) by the calculated amount. It would have to be rotated by the formula "[var:221] * 22.5" but when I use a float variable to store the result of the calculation I'm not able to use it with the "Object: Transform" action, which wants a Vector3 variable as a parameter. The other way when I use a Vector3 variable to store the amount of the wheel to be rotated I'm not able to set it via formula.

Does someone have an idea, how to do it?

Comments

  • Got it by doing it in a loop with a local counter variable. It's just a bit cheese but works...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.