Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3636440
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:02:00+00:00 2026-05-19T01:02:00+00:00

Hello all. After a good long Sunday google I am going to have to

  • 0

alt textHello all.

After a good long Sunday google I am going to have to hang my head in shame and ask the question…

What I have is a pivot vector2, a “Previous” vector2 and a “Current” vector2.

I would like to be able to calculate the rotation in radians between them. A slight complication is the fact that the pivot may moved between previous and current but ill deal with the offsetting as a separate issue if you don’t have the time to bring that into the fold.

To clarify, an object which has two vectors, a pivot and a base … the pivot sitting in the centre and the base at the bottom is rotated around an external pivot. I need to work out the rotation of the object itself around its centre using the two mentioned vectors.

Very big thanks to anyone that can help.

Background to problem

I have a game where an object is rotated around an external pivot. By using using two points (one in the centre, one at the base of the object) I am wanting to to work out the rotation that needs to be applied to the objects sprite around its centre to conform to the larger rotation that has been applied.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:02:01+00:00Added an answer on May 19, 2026 at 1:02 am

    Take the cross product of the differences between the vectors and the pivot:

    Vector2 a = Pivot - Previous, b = Current - pivot;
    double angle = a.X * b.Y - a.Y * b.X;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all I am working on html and javascript.And I am going to ask
Hello all I am working on javascript jquery and svg.I want to ask a
hello all i am working on a project in which i have a webpage
hello all I have a small dialog which I created dynamically, which has a
hello all this seems to be my problem I have a table in mysql
Hello all I am working in javascript and html5.I want to ask that how
Problem Hello all! I have this code which takes my jpg image loops through
Hello good people of stackoverflow, this is a conceptual question and could possibly belong
I have been looking all over the Internet for an answer to this question
Hello all i have a button i am trying to let users share a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.