SFML community forums
Bindings - other languages => DotNet => Topic started by: Lox on July 21, 2011, 06:08:31 am
-
So, I've got a little dilemma here:
mObj = objList[i].bbox;
oObj = objList[q].bbox;
if (mObj.Intersects(oObj,out overlap))
{
SFMLWin.Draw(Shape.Rectangle(mObj, new Color(0, 255, 255)));
SFMLWin.Draw(Shape.Rectangle(oObj, new SFML.Graphics.Color(0, 255, 0)));
SFMLWin.Draw(Shape.Rectangle(overlap,new SFML.Graphics.Color(255,0,0,255)));
}
Which yeilds:
(http://img508.imageshack.us/img508/5233/asdfgr.png)
Uhh, what? How do these to intersect, and where did the overlap go?
-
May be you can show us your full loop ?
From you code: you draw a cyan rectangle then a green rectangle over then a red rectangle over.
Nothing incompatible with your output if mObj = oObj.
-
You're right. I looked into my loop and mObj = oObj at some point.
Thanks :)