Loading models from .json file

Talk about graphics, 3D models, nice sprite sheets, music, sound effects and anything related to the presentation of your game (not code :)).

Loading models from .json file

Postby mayank_bisht » Mon Jan 09, 2017 6:31 am

Hi,

I am beginner in game development. I have box2d car model in .json file. I am not able to load that model from that .json file in libgdx game.
Any help or direction would be appreciated.
mayank_bisht
 
Posts: 1
Joined: Mon Jan 09, 2017 6:26 am

Re: Loading models from .json file

Postby Ankit Gupta » Tue May 09, 2017 5:22 am

You can load the json file using AssetManager class which can load the file either from assets or external storage. To load from the assets, use default constructor. And to load from the External storage you can use new AssetManager(new ExternalFileBrowser) constructor which will return you external storage path. then you can locate your desired path of the json file. Hope that helps.
Ankit Gupta
 
Posts: 4
Joined: Tue May 09, 2017 5:18 am
Location: Gururgram, India

Re: Loading models from .json file

Postby Derek Bronson » Fri Apr 13, 2018 9:29 am

Ankit Gupta wrote:You can load the json file using AssetManager class which can load the file either from assets or external storage. To load from the assets, use default constructor. And to load from the External storage you can use sizzling hot online real money constructor which will return you external storage path. then you can locate your desired path of the json file. Hope that helps.


Good to know!
Derek Bronson
 
Posts: 1
Joined: Fri Apr 13, 2018 9:28 am


Return to Game Art

Who is online

Users browsing this forum: No registered users and 1 guest