Search found 694 matches

by drleviathan
Thu May 13, 2021 3:48 am
Forum: General Bullet Physics Support and Feedback
Topic: Manual collision response for kinematic objects
Replies: 1
Views: 54

Re: Manual collision response for kinematic objects

The way to do this is to "sweep" the kinematic object from oldTransform to newTransform and to stop at first hit, else teleport to newTransform . This is how the btKinematicCharacterController works, as I recall, although it does a series of sweeps each frame so that it can walk up and dow...
by drleviathan
Tue Apr 27, 2021 8:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: Issue moving objects that are constrained together.
Replies: 3
Views: 369

Re: Issue moving objects that are constrained together.

Ah... it happens in the middle of the step? Maybe try teleporting things right before the next step. That is: set a bool variable teleportBeforeNextStep in the collision callback and outside the step: when teleportBeforeNextStep is true : do the teleport outside of the step itself and set teleportBe...
by drleviathan
Tue Apr 27, 2021 7:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Issue moving objects that are constrained together.
Replies: 3
Views: 369

Re: Issue moving objects that are constrained together.

Here are some ideas: (1) Don't teleport the kinematic object in one step. Instead animate it from A to B quickly, but over several steps. This will give the constraint time to pull the dynamic object to its new location in a smoother way. (2) If you must teleport the kinematic object in one step, th...
by drleviathan
Tue Apr 27, 2021 2:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Character standing on a moving vehicle
Replies: 6
Views: 758

Re: Character standing on a moving vehicle

This is really hard to do. By tweaking the friction and damping and adding special "am I standing on a vehicle?" logic to your character you might get satisfactory results with only one "world" if your vehicle moves slowly, however such a system will eventually fail as vehicle ve...
by drleviathan
Fri Apr 09, 2021 3:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: Improving performances of transported objects [SOLVED]
Replies: 8
Views: 1188

Re: Improving performances of transported objects

Maybe use btGhostObject for your sensors instead of just btCollisionObject. If you need your sensors have a fancy shape instead of just a box then there is extra work involved.
by drleviathan
Fri Apr 09, 2021 3:34 am
Forum: General Bullet Physics Support and Feedback
Topic: Improving performances of transported objects [SOLVED]
Replies: 8
Views: 1188

Re: Improving performances of transported objects

To ensure sensor detection: make sure your kinematic objects are kept "active". This should always be true when using MotionStates to move them around because the MotionState.getWorldTransform() is only called on active kinematic objects. I believe kinematic-vs-static objects do not "...
by drleviathan
Fri Apr 02, 2021 3:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: Improving performances of transported objects [SOLVED]
Replies: 8
Views: 1188

Re: Improving performances of transported objects

It occurs to me: I don't know if the CProfileManager stuff works in the multi-thread paradigm. So if you tried it... dunno if it would actually work. I've never played with the multi-threaded Bullet however I would expect single-threaded Bullet to be able to push several hundred dynamic objects, eve...
by drleviathan
Thu Apr 01, 2021 10:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: Improving performances of transported objects [SOLVED]
Replies: 8
Views: 1188

Re: Improving performances of transported objects

If you want to first measure where the time is being spent inside the Bullet step before taking optimization measures you could use the CProfileManager utility in Bullet to get a nice printout of time spent in each context. Rather than outline its usage here I suggest you research previous threads a...
by drleviathan
Wed Mar 31, 2021 2:43 pm
Forum: General Bullet Physics Support and Feedback
Topic: Use of api(CreateFromTriMesh)
Replies: 3
Views: 744

Re: Use of api(CreateFromTriMesh)

I looked at the code for btSoftBody . AFAICT the m_collisionDisabledObjects vector date member of that class is used when linking soft bodies together with "anchors". If you're not doing that then you would expect that vector container to be empty. The m_bodySolver is set internally, impli...
by drleviathan
Wed Mar 24, 2021 2:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: Use of api(CreateFromTriMesh)
Replies: 3
Views: 744

Re: Use of api(CreateFromTriMesh)

You should examine the implementation of btSoftBodyHelpers::CreateFromTriMesh() inside the CPP file to see how they are used. But I would guess: const btScalar* vertices is a pointer to a buffer of btScalar representing the float or double (depending on if btScaler is a float or double) values the v...
by drleviathan
Mon Mar 22, 2021 3:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: "multiple mesh parts" with btBvhTriangleMeshShape?
Replies: 4
Views: 903

Re: "multiple mesh parts" with btBvhTriangleMeshShape?

Ah I see... looking closer at the code I rediscover: the btBvhTriangleMeshShape uses an instance of something that implements the btStridingMeshInterface and that interface supports having the mesh split into sub-parts. Yes, I recall taking advantage of that multiple parts API. At one time we were l...
by drleviathan
Fri Mar 19, 2021 10:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: "multiple mesh parts" with btBvhTriangleMeshShape?
Replies: 4
Views: 903

Re: "multiple mesh parts" with btBvhTriangleMeshShape?

My interpretation of the manual (although I wasn't able to find a copy with the section you describe) is: if you have multiple distinct mesh "parts"... then you could store them in single btBvhTriangleMeshShape instance in one RigidBody... and the collision behavior would be identical to w...
by drleviathan
Tue Mar 16, 2021 4:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object falling when turning
Replies: 1
Views: 755

Re: Object falling when turning

The ball easily falls out of the pipe because when the pipe is "teleported" to a new transform the two objects interpenetrate and the "interpenetration logic" is happy to push the ball to the outside. It doesn't know inside from outside: it just tries to resolve the overlap. You ...
by drleviathan
Tue Mar 09, 2021 10:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Hinge vehicle balance
Replies: 3
Views: 962

Re: Hinge vehicle balance

Car race-em games often require very tuned "game physics" (as opposed to "accurate physics") in order to make them fun. The example for this I usually give is: crashes. Accurate car crashes happen quite fast: you're in control when suddenly the vehicle is tumbling faster than you...
by drleviathan
Wed Mar 03, 2021 4:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: [HELP] Explosiveness and stretching of physical object connections
Replies: 3
Views: 825

Re: [HELP] Explosiveness and stretching of physical object connections

Because of bug, sword when attached to hand was always falling, increasing it's velocity higher and higher so everything it touches would fly away. Sword was separate object that was moving as their own as attachment to hand bone, so it wasn't physical movement. Ah I see: you were slamming the swor...