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 4058056
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:01:53+00:00 2026-05-20T15:01:53+00:00

I’m making a 3D game in XNA using Ox Engine. There is very little

  • 0

I’m making a 3D game in XNA using Ox Engine. There is very little documentation and I have been surviving thus far, but now I’ve hit a logical road block for a good while and I think it’s time to ask for outside help.

All movement and mouse look x work and the camera follows properly however when I move the mouse up/down on the Y axis to make the camera move in its circling “bubble” around the character it causes everything else to go out of sync. The character should orbited by the camera, but it also needs to be told what direction the character is facing. I cannot seem to have both.

When I have the code to tell it the direction of the character and move “away”(transpose) from it, it’s moving the orbit itself:

        if (changeY > 0)
        {
            if (camMemory.Y > 110)
                tempMatrix *= Matrix.CreateFromAxisAngle(model.Orientation.Left, MathHelper.ToRadians(changeY));
        }
        else if (changeY < 0)
        {
            if (camMemory.Y < 400)//FAKE PLACEHOLDER VALUE... highest point in arc goes here
                tempMatrix *= Matrix.CreateFromAxisAngle(model.Orientation.Left, MathHelper.ToRadians(changeY));       
        }

        Vector3 camPos = new Vector3(0, 0, 0) ;
        camMemory = tempMatrix.Translation;

        //NOTE: this is the piece that causes the "bubble" to move
        moveAmount = tempMatrix.Forward * 200f;
        /////
        tempMatrix.Translation += moveAmount;
        camPos = tempMatrix.Translation + model.Position;

        //Pointer in front, Camera behind, make camera face pointer.



        Engine.Camera.SetTransformByLookTarget(camPos, model.Orientation.Up, trackPos);

This means that by not properly orbiting the character, when he turns the camera is out of place.

However when I remedy this problem I am not far enough away from the character to have a proper view and simply multiplying upon tempMatrix.Translation to ‘widen’ the ‘bubble’ causes me to be severely out of place. I am bereft of epiphanies. Any insights would be greatly appreciated.

tl,dr: How do I make the orbiting camera bubble around the character bigger without moving the center point (transpose isn’t working or I’m using it wrong!)

Edit: I wish I could put a bounty on this, lol

  • 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-20T15:01:54+00:00Added an answer on May 20, 2026 at 3:01 pm

    The character should orbited by the
    camera, but it also needs to be told
    what direction the character is
    facing. I cannot seem to have both.

    The way to have them both is to set the camera position based on offsets to the character’s matrix basis vectors. This way when the character rotates and changes a basis vector, your camera will follow it. While at the same time or independently, changing the offset value will make your camera orbit the character as well.

    It appears that your code is only orbiting about the model’s X axis. To demonstrate the approach about that axis, you can do something like this:

    Vector3 offset = Vector3.Transform(model.Orientation.Backward, Matrix.CreateFromAxisAngle(model.Orientation.Left, camMemory.Y));
    
    camPos = model.Position + (offset * bubbleSize);
    

    So now, if the character rotates on his own, the camera will follow because model.Orientation.Backward will change. But also, if camMemory.Y changes (I’m assuming this is keyed off input), the camera will orbit on its own.

    Note how scaling the offset vector affects ‘bubble’ size.

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

Sidebar

Related Questions

No related questions found

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.