Page 7 of 14

Posted: Wed Dec 29, 2010 12:07 pm
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.

Posted: Wed Dec 29, 2010 12:38 pm
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.

Posted: Wed Dec 29, 2010 10:50 pm
by Zurzaza
...or maybe you need to set the proper maxSubSteps and Time Step Value ;)

Posted: Thu Dec 30, 2010 7:34 am
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?

Posted: Thu Dec 30, 2010 8:44 am
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.

Posted: Tue Jan 11, 2011 6:30 pm
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.

Posted: Wed Jan 12, 2011 6:25 pm
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! ;)

Posted: Fri Jan 14, 2011 11:18 am
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.

Posted: Fri Jan 14, 2011 2:00 pm
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

Posted: Mon Jan 17, 2011 11:47 am
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.

Posted: Mon Jan 24, 2011 5:55 pm
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!

Posted: Mon Jan 24, 2011 9:01 pm
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:

IrrBP and btCollisionObject/btRigidBody

Posted: Mon Feb 14, 2011 12:35 am
by spacetime
Maybe a stupid question. How can I set restitution, linear velocity or friction using IrrBP ? :oops:

Posted: Mon Feb 14, 2011 3:26 pm
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 and btCollisionObject/btRigidBody

Posted: Mon Feb 14, 2011 10:19 pm
by spacetime
THX a lot Zurzaza, you rock. Works like a charm.
:lol: