- Home /

# How to calculate an end point of a line after rotating an angle in three-dimensional space? Thanks!

I have a line in three dimensional space starting from origin and end point is also known parameter.The line is rotating in 3D with origin as (0,0,0).How can we find the new end position by rotating angle and initial start and end position of line ?

Initial start position? But you said that was always just 000. Is the line also rotating around 000 (which false is assuming?)?

Or does it rotate around some other point (like the center of the line)?

Is this pure math, or are there actual gameObjects involved? With actual gameObjects, most people just make an empty child, rotate the object, then read off the child position. No math involved.

**Answer** by fafase
·
May 02, 2014 at 08:53 AM

Since you are at the origin, the vector itself will give you the end point.

So if your vector is 3,3,3 then the end point is 3,3,3. Rotate it in whatever circumstances and the vector (x,y,z) is now the point at the end of it.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.