Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    198
  • comments
    445
  • views
    83457

## Skiing combines outdoor fun with knocking down tre

Sign in to follow this  
Laz

247 views

So last night I amazingly, accidently stumbled upon what was making my game not work in full screen mode (and windowed mode, for some people). What I'm doing is projecting the player's 3D position to 2D window coordinates, and getting the vector between the player and the cursor. Well, here's the culprit:

Quote:
UpdatePosition2D();

ShipToCursor.x = input->GetCursor()->x - fPosition2D.x;
ShipToCursor.y = -(input->GetCursor()->y - fPosition2D.y);
ShipToCursor.z = 0;

Vec3f NewRight = ShipToCursor.cross(matrix.GetZ());


For some reason, whenever the cursor and the ship are at the *EXACT* same window coordinates in full screen mode (windowed for some people, too), my cross product gives me garbage. Now, I don't know how to fix it, but at least I know where to start looking.

I apologize for the boring post, just wanted to share my findings. Maybe one of my two readers will know of a solution I can start looking into.

Quote:
"Skiing combines outdoor fun with knocking down trees with your face."
- Dave Barry
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!