Page 1 of 1
Can not use custom properties in b2dJson for Objective C ++
Posted: Sat Feb 02, 2013 9:09 pm
by cuongv88
The function "getBodiesByCustomString()" is not exist in b2dJson.mm.
Is it not ported to Objective C ++ yet ? How can i use custom properties in Objective C ?
Thanks in advance.
Re: Can not use custom properties in b2dJson for Objective C
Posted: Sun Feb 03, 2013 12:39 am
by iforce2d
Hm.... looks like I did not update the iOS sample project, if that's what you are using.
The loader does not really need to be 'ported' to Objective C++ because you can just change the file extension. You can take the b2dJson related files from the main sample (in folder titled "box2d-testbed-(C++)") and rename the .cpp file to .mm
I will have to update the sample sometime...
Re: Can not use custom properties in b2dJson for Objective C
Posted: Sun Feb 03, 2013 4:41 pm
by cuongv88
I will try to use .cpp file and let you know the result.
Thanks.
Re: Can not use custom properties in b2dJson for Objective C
Posted: Sun Feb 03, 2013 5:26 pm
by cuongv88
I checked C++ sample project but can not found where function "getBodiesByCustomString()" was defined.Maybe my main sample was out of date ?
Re: Can not use custom properties in b2dJson for Objective C
Posted: Sun Feb 03, 2013 8:07 pm
by iforce2d
It is in the b2dJson files (.h and .cpp). In the sample project these are under src/Box2D/Testbed/Tests/rubestuff
You can also find them at
http://www.iforce2d.net/b2djson/