Jump to content

Orienting two points towards each other on a spherical

Recommended Posts

I have two points on a spherical surface.

Each point should only rotate along it s own Y axis (which is simply an axis along the from the center of the sphere to the point itself).

A good analogy example would be two flagpoles standing on a small planet and I want each flag to rotate in the direction of the other flagpole.

Not pointed at the other flag but simply calculate the y rotation of each flagpole to most orient itself in the direction of the other.

I'd also like to stay out of VEX for this.

I did create a clunky solution which utilized a boolean intersection operation based on some geometric shapes I created based on the point position but it was really convoluted and not a very mathmatical solution.

Any thoughts on the simplest approach?

I feel like it should be really simple but for some reason I'm really struggling with this.











Share this post

Link to post
Share on other sites


not quite sure what you are trying to do. But if you want to orient a point to another, you can set the up vector as the direction to the other point, where the normal is just the surface normal (direction from center to point).

Here is an example (but using VEX)


Share this post

Link to post
Share on other sites

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