I have a little problem here with OpenGL when I try to get the ClientSize.Height and Width. It returns an integer of 262 for both so my calculations to detect if the player ship is out of the window are wrong.
private void UpdateCollisions()
{
if (_playerCharacter.GetBoundingBox().Y <= 0)
{
moveUp = false;
}
else
{
moveUp = true;
}
if (_playerCharacter.GetBoundingBox().Y >= _clientHeight)
{
moveDown = false;
}
else
{
moveDown = true;
}
...
P.S: _clientHeight is the height I'm getting in the constructor (one of the two 262 int).
This is an example of what I'm trying to do but the ship can only move from left to right from about the center to the 1/4 from the right of the screen. He can't go up but he can go down for something that seems like infinite (well, it goes off screen).
I'm sure I'm not the only one who tried to do something similar to this before, I would appreciate some help. Thank you!