-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Using the latest libgdx, the BodyEditorLoader will throw an exception as soon
as it try to cast a Long to a Float since the current behavior changed.
The fix is quite easy: just perform an "instanceof" check before casting and
choose the right type before performing the type conversion.
As an example, here is what i'm doing:
rbModel.origin.x = (originElem.get("x") instanceof Float) ? (Float)originElem.get("x") : (Long)originElem.get("x");
rbModel.origin.y = (originElem.get("y") instanceof Float) ? (Float)originElem.get("y") : (Long)originElem.get("y");
This has to be done for polygons and circles as well.
Original issue reported on code.google.com by manuel....@gmail.com
on 21 Apr 2013 at 2:12