Previous topicNext topic

Set the Rotation Point

Questions, comments, feedback, etc.
Post Reply
VidEZ
Posts: 16
Joined: Sat Jan 16, 2021 8:03 pm

Set the Rotation Point

Post by VidEZ »

Hi,
I am trying to make something like light rays. I created a bunch of very very narrow, kind of long triangles as the rays. I want the rays to start or have an origin from the top of the screen.
However.....when I rotate the rays, or kind of fan them out, using the Z axis, they rotate about the center of the triangle (shape).....

Is there a way to rotate about a certain point in a shape (here, a very narrow and long triangle?

Thanks,
VidEZ


Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Set the Rotation Point

Post by Sadler »

Imagine where you want the point of rotation to be then move that position to the centre of the screen. Then apply your rotation and move the element to wherever you need it. There is an order of operations when dealing with transforms.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Set the Rotation Point

Post by Magic »

There are many examples of this in the sample projects.
Post Reply