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

## Skiing combines outdoor fun with knocking down tre

Sign in to follow this  


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:


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.

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


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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!