irrBP - An Irrlicht - Bullet Physics Wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
zulis
Posts: 3
Joined: Thu Jun 08, 2006 7:48 am

Post by zulis »

What is the best way to increase physics speed? Now everything moves like in slow motion movie.
Do we have to play with gravity or setTimeStep value, or maybe something else? Thanks.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

@ Zulis:
a) Scale everything down.
b) increase the gravity.
c) Unknown to me

When I mess around with physics I usually increase the gravity to avoid scaling everything in the scene.
Working on game: Marrbles (Currently stopped).
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

...or maybe you need to set the proper maxSubSteps and Time Step Value ;)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Zurzaza wrote:...or maybe you need to set the proper maxSubSteps and Time Step Value ;)
But you can't adjust it much anyways, can you?
Working on game: Marrbles (Currently stopped).
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Scaling your simulation is the best way, but not too small. Moving objects that are < 0.2 units in any dimension could result in tunneling, so plan accordingly.

I've had to scale my simulation by 2 because my smallest gun is a pistol that has a width of 0.1 and I was having a really hard time getting the thing to reliably land on any surface.


Oh I got my character controller working, trick is to setup the SimTickCallback to iterate through all the contact manifolds and apply game logic to what is happening if the character.

For example, for my character controller to have 'falling' damage (or 'impulse damage', like when an object going fast hits it), I check all the manifolds for if the character's body is colliding, if it is I check the impulse on the character's body. if it is above a certain threshold, i apply damage equal to the amount over the threshold. So if a rock gets thrown at me really fast, i die. If i fall off a 20 ft cliff, i get like 1/2 health damage. The sliding effect deals with the normal of the contact point being at a certain angle. If it's too steep, i set the player's friction to 0 so it slides back down.
__________________________________
...you'll never know what it's like, living your whole life in a dream...
Monio666
Posts: 14
Joined: Fri Nov 19, 2010 12:37 pm

Post by Monio666 »

I everyone, I was disconnected of the world for christmas, new year, a little illnes XD. So I'm back to work now and I'm happy to see r40 has been released in this time.

Thanks Zurzaza, I'm going to check the new version.

EDIT: YES! the rotation of the body works really great now! all my problems are gone now!. I'm going to check the new function (isPairColliding) that it may be very usefull to me.

Again, thanks Zurzaza, you did a great job.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Nice to hear that, and thank you again for your bug-report.
When I have enough changes, i'll release a new version of irrBP (New constraint implementation: 6DOF & (Maybe) Springs).

Stay tuned! ;)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Monio666
Posts: 14
Joined: Fri Nov 19, 2010 12:37 pm

Post by Monio666 »

Hello again.

isPairColliding works well too, it's a very usefull function. Only one more thing, I don't get good results with isBodyColliding(object), the collision detection works much better with getBodyCollidingPoint(object,point), maybe you want to check it ;)

Thanks again, bye.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Monio666 wrote:Hello again.

isPairColliding works well too, it's a very usefull function. Only one more thing, I don't get good results with isBodyColliding(object), the collision detection works much better with getBodyCollidingPoint(object,point), maybe you want to check it ;)

Thanks again, bye.
that because isBodyColliding and getBodyCollidingPoint are using 2 different method of collision test, the second one uses an official bullet function to test a collision, while the first one uses an algorithm that iterates over the colliding pairs (with a manifold).
I'll try to fix the first function, but i'm not sure to fix that.

p.s. Also see That
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Monio666
Posts: 14
Joined: Fri Nov 19, 2010 12:37 pm

Post by Monio666 »

Ok, I was just informing XD. The detection detection works really well with getBodyCollidingPoint so it's not neccesary for me to have fixed the other function.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Hi everyone, I am here to announce the lastest version of irrBP (0.31), that fixes a lot of bugs and an important memory leak (so everybody should update to that version).
And a great news for Linux Users:
From irrBP 0.31 a Linux package will be available under the download section with precompiled bullet & irrBP libraries.

Stay tuned!
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Great to see that you're improving this wrapper.

I hope I'll finish writting a basic game framework by the time this wrapper reaches 1.0 version :lol:
Working on game: Marrbles (Currently stopped).
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

IrrBP and btCollisionObject/btRigidBody

Post by spacetime »

Maybe a stupid question. How can I set restitution, linear velocity or friction using IrrBP ? :oops:
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

To use some of the function not yet included in irrBP, you can get the "raw" bullet pointer and directly use those function (in your case):

Code: Select all

CIrrBPBoxBody * yourBody;
yourBody->getBodyPtr()->setFriction(1.0f);
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

IrrBP and btCollisionObject/btRigidBody

Post by spacetime »

THX a lot Zurzaza, you rock. Works like a charm.
:lol:
Post Reply