-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision and Drawing with negative Width and Height not working #747
Comments
@PalladiumPeet I'm just a user like you, but to me, I don't understand why you have negative width and height values? How can you draw something that has no width, or rather, has inverted width? At the bottom, I've linked to what appear to be the code for this RectangleF, but again, I don't think this is a bug, to me, a 2D object would never have a negative width. If you want to "flip" the image, that's not default rectangle behavior. An inverted (negative) width or height would basically be impossible in normal 2D environment. Possible work-around:
|
Hello, i came across an issue with negative Width and Height while drawing RectangleF or using it for Collision Detection.
For example, when the shooting direction is to the upperleft corner starting by the player position, there will be a negative direction.
this draws to this:
and for Collision if have this example, which is always false
and when adding a ICollsionActor-Class with such a RectangleF with negative Width or Height to the CollisionComponent, i will never collide with anything.
I have looked through the other open issues and through the MG-Forum, but couldn't find anything of help on this topic.
Please excuse me, if this isn't an issue (and i'm too stupid) or someone already knows about it.
Thanks in advance
Edit: Formatting
Edit2: Have inserted the wrong code before, corrected it
The text was updated successfully, but these errors were encountered: