Sign in to follow this  

Calculation rotational values

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Quote:
Original post by Schinizer
Hi all.

How do u calculate rotational values using only a position point and a target point?

Like for example, a camera facing a point.

Thanks in advance.
This is discussed pretty often on the forums; here are a few search terms you might try:

billboard
align to vector
align to normal
aim at point
aim at target
rotate to target
look-at transform

Etc.

Note that there's no unique solution to the problem as stated; therefore, you'll need to introduce an additional constraint (a fixed reference or 'up' vector is often used for this purpose). Also, you don't necessarily need to compute rotation values (by which I assume you mean Euler angles or something of that sort); you can just as easily compute the orientation directly in matrix, quaternion, or vector (e.g. orthonormal basis) form.

Note also that a 'look at' function will typically not only orient the object towards a target point, but will also invert the transform (since you mentioned facing a camera towards a point, maybe this is what you're looking for).

Share this post


Link to post
Share on other sites

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this