Bullet Physics now an AppState

Hey,

I made the physics an AppState now, its called BulletAppState, SimpleBulletApplication has now been deprecated in favor of this (in fact it uses a BulletAppState itself now).

Usage is very simple:

[java]BulletAppState physicsState=new BulletAppState();

stateManager.attach(physicsState);[/java]

This now also allows you to use multiple physics spaces in a very simple manner.

Cheers,

Normen

4 Likes

I am impressed. :open_mouth:

It’s like you’re doing magic. Normen the digital wizard :slight_smile:

i also like it, a cleaner and a more accessible way. Good work Normen!

Ack! You’ve forced meh to learn AppStates! Arg! :wink:



I knew this day was coming, no worries. :stuck_out_tongue:



Also, I second “Normen the Digital Wizard.”

So i switched now to BulletAppState since SimpleBulletApplication is deprecated.

Where do i put my physics update stuff now? simplePhysicsUpdate => simpleUpdate ?

What is with the tpf? Is it the same(I need the physics tpf for some calculations)?

Do i make my own BulletAppState and override the update method?

Look at the source of SimpleBulletApplication for how its done.

Worked. Thanks ;).