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

  • Home
  • SEARCH
  • 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 6019665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:27:16+00:00 2026-05-23T03:27:16+00:00

Firstly – Z is Up in this problem. Context: Top down 2D Game using

  • 0

Firstly – Z is Up in this problem.

Context: Top down 2D Game using 3D objects.

The player and all enemies are Spheres that can move in any direction on a 2D Plane (XY). They rotate as you would expect when they move. Their velocity is a 3D vector in world space and this is how I influence them. They aren’t allowed to rotate on the spot.

I need to find a formula to determine the direction one of these spheres should move in order to get their Z-Axis (or any axis really) pointing a specified direction in world space.

Some examples may be in order:

X
|
Z--Y

This one is simple: The Spheres local axes matches the world so if I want the Spheres Z-Axis to point along 1,0,0 then I can move the sphere along 1,0,0.

The one that gives me trouble is this:

X
|
Y--Z

Now I know that to get the Z-Axis to point along 1,0,0 in world space I have to tell the sphere to move along 1,1,0 but I don’t know/understand WHY that is the case.

I’ve been programming for ten years but I absolutely suck at vector maths so assume I’m an idiot when trying to explain 🙂

  • 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-23T03:27:17+00:00Added an answer on May 23, 2026 at 3:27 am

    All right, I think I see what you mean.

    Take a ball– you must have one lying around. Mark a spot on it to indicate an axis of interest. Now pick a direction in which you want the axis to point. The trick is to rotate the ball in place to bring the axis to the right direction– we’ll get to the rolling in a minute.

    The obvious way is to move “directly”, and if you do this a few times you’ll notice that the axis around which you are rotating the ball is perpendicular to the axis you’re trying to move. It’s as if the spot is on the equator and you’re rotating around the North-South axis. Every time you pick a new direction, that direction and your marked axis determine the new equator. Also notice (this may be tricky) that you can draw a great circle (that’s a circle that goes right around the sphere and divides it into equal halves) that goes between the mark and the destination, so that they’re on opposite hemispheres, like mirror images. The poles are always on that circle.

    Now suppose you’re not free to choose the poles like that. You have a mark, you have a desired direction, so you have the great circle, and the north pole will be somewhere on the circle, but it could be anywhere. Imagine that someone else gets to choose it. The mark will still rotate to the destination, but they won’t be on the equator any more, they’ll be at some other latitude.

    Now put the ball on the floor and roll it — don’t worry about the mark for now. Notice that it rotates around a horizontal axis, the poles, and touches the floor along a circle, the equator (which is now vertical). The poles must be somewhere on the “waist” of the sphere, halfway up from the floor (don’t call it the equator). If you pick the poles on that circle, you choose the direction of rolling.

    Now look at the marks, and draw the great circle that divides them. The poles must be on that circle. Look where that circle crosses the “waist”; that’s where your poles must be.

    Tell me if this makes sense, and we can put in the math.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, this seems like (from ContourPlot) a fairly straightforward maximization problem, why is FindMaximum
Firstly, I'm pretty new to C++. I believe that getline() isn't a standard C
Firstly, this is not a question about repository synchronisation for which there are numerous
Firstly, is it possible? Been struggling with this one for hours; I think the
Firstly, I want to restrict this question to web development only. So this is
firstly i just clearify the problem. i am testing the page of login of
Firstly: apologies if this is a duplicate post. Things got a bit confusing as
Firstly, let me set out what I'd like to do. Assume I have three
Firstly, I'm a newbie to C# and SharePoint, (less than a month's experience) so
Firstly, Real World Haskell , which I am reading, says to never use foldl

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.