Multiple Objects Revolving Around A Rotating Actor
Currently I am creating an editing tool with which you can manipulate multiple objects using an actor which serves as a cursor or pivot point. At the moment it is possible to move, scale and rotate objects with this cursor actor.
Below is the code as well as a short GIF to demonstrate how it is setup at the moment:
As you can see the setup is almost complete however there's an issue with the rotation. At the moment the rotation of the cursor will rotate the objects around themselves. Instead what I need is for the objects to actually revolve around the cursor and actually changing the positions of the objects rather than their rotation.
Question: How to rotate the objects around the cursor instead of themselves?
I hope I was clear enough. I've already searched for a few solutions but I must be doing something wrong since I get strange glitches and I didn't manage to make the objects revolve around the cursor.
I'm happy for any kind of advice,
Have a nice day!
I assume that your pivot point is spawned with zero rotation. When it is spawned, you have to save the relative delta vector from the pivot point to each actor that needs to be transformed by it. Now when you rotate your pivot point, rotate the delta vectors too. Then the final location of each actor is the pivot point location + the rotated delta vector.
answered Apr 30 '17 at 01:45 PM
Solution with no code at all.
answered Apr 30 '17 at 04:52 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here