Page 1 of 1

[issue] ConstraintDrawer.Remove() method do nothing

Posted: Thu Dec 10, 2015 10:32 am
by JusTiCe8
Hi Norbo,

in LineDrawer class, the remove method doesn't work:

Code: Select all

var lineDisplayObject = displayObjects[i] as LineDisplayObject<T>;
if (lineDisplayObject != null && lineDisplayObject.LineObject.Equals(o))
despite displayObjects is not null, the resulting cast (not sure of the desired goal here) in lineDisplayObject is always null (at least in my tests), so lines are actually not removed.

Included in patches and sources for both DemoGame (add LineDrawer to demo constructor + a few change in demo order, some unrelated) and RobotArmDemo to show the issue. Enable constraints display, press 0 on the numpad and see what happened, moving arms part could also show it ore obviously.

Re: [issue] ConstraintDrawer.Remove() method do nothing

Posted: Thu Dec 10, 2015 6:53 pm
by Norbo
There was a bug in the handling of SolverGroups in the remover. It should be fixed now (though I'll admit I didn't do much testing). Thanks for the report!

Re: [issue] ConstraintDrawer.Remove() method do nothing

Posted: Fri Dec 11, 2015 4:11 pm
by JusTiCe8
Thanks for your time and the superquick fix ;). I didn't test it yet too, I'll tell you if it's not ok or found any issue.

EDIT: tested on my own code, it's ok.