### Circle Script easy for anything!

Posted:

**10/18/2016, 7:15 am**So i needed light to rotate around object, i always ended up with messed rotation.

So i decided to use my old school Math code from programming

If you have any other idea hit me. i tried alot and this did work best for me.

To rotate in circle and everything else is fixed!

So you put this into Expression like above.

If you have 3d space and you need light to rotate above and around object you use Z and X

explanation

remember you need to first Separate Dimensions

r= Radius (how far from center does it rotate)

xCenter and yCenter are your values where is positioned example in 2d model 1080p would be x=960 and y=540 rotate around center

time you can leave or multiply or divide

Or you can make 3dimensional rotate sphere like!:)

Quick Example:

So i decided to use my old school Math code from programming

If you have any other idea hit me. i tried alot and this did work best for me.

To rotate in circle and everything else is fixed!

- Code: Select all
`r*Math.cos(time)+xCenter`

r*Math.sin(time)+yCenter

So you put this into Expression like above.

If you have 3d space and you need light to rotate above and around object you use Z and X

explanation

remember you need to first Separate Dimensions

r= Radius (how far from center does it rotate)

xCenter and yCenter are your values where is positioned example in 2d model 1080p would be x=960 and y=540 rotate around center

time you can leave or multiply or divide

Or you can make 3dimensional rotate sphere like!:)

Quick Example: