• News

• Industries

• Learning & Support

• Community

• Marketplace

# Rotate vectors around vector

Hey, How can I rotate bunch of vectors around one vector?
For an instance:

I have 3 vectors (blacks) and one vector (red).
I want to rotate all the blacks around the red depending on angle.
So the result will be:

Is there a function?
Thank you!

The easiest way is just to parent the black objects to the red object, that way their rotation will be relative to the red object. If they are all USceneComponents you can just use AttachTo. Otherwise, you’ll need to write some code that grabs the parent transform, and then applies the local child transform.

I can not do that with parent-child at all. Those vectors are locations which my system uses. It is not a sceneCompenent or something like that.

Hmm, I assume these vectors aren’t actual objects? I.e. they don’t have full transforms? They’re simply a bunch of vectors? 2D/3D (although that shouldn’t really matter)?

They are dots in space. And they are very matter.
So I understand that I need to use math to do this?

Give this a read and see if it helps you out.

http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-4