A couple questions

Post Reply
shultays
Posts: 4
Joined: Thu Apr 09, 2015 2:34 pm

A couple questions

Post by shultays »

Hello, I have a couple questions about bullet. I am not sure if I should open a topic for each seperately but ask them in one topic. I am sorry if I am doing a mistake.

* First question is can I write custom collision/contact handlers? I want to 'absorb' part of the collision response by deforming the mesh. In bullet it instantly stops the rigid body when it hits a collision object, instead I want to deform the mesh and only slow down the physic object.

* I want to create some unimportant rigid bodies in client only, do not want to sync them with server. So important objects (like player) should be able to push them but they shouldn't move the player, is it possible? One object affects the other but not the otherway.

* About the center of mass in the rigid body, I read that center of mass is center of transform for rigid bodies, is building the rigid body shifted by the center of mass only solution? It complicates my code a lot, I have to re-shift it back to for my views too.

That is all for now, thanks
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: A couple questions

Post by drleviathan »

(1) Yes, I think it is possible to perform custom handling of certain collisions. Such handling would be mostly custom code that you would need to write. There is probably more than one way to do it -- it is possible to catch and modify contact points in Bullet, but Bullet also supports soft-body collisions (but I don't know much about the soft-body stuff).

(2) It sounds like you're talking about "distributed physics" where you run a simulation on the client but also on the server. Distributed physics is not a feature of Bullet, but you could use Bullet to run the server simulation and Bullet to run the client simulation, and then write custom code to communicate between the two... but YOU would have to write it.

(3) Yes it is possible to move the Shape of a RigidBody such that the RigidBody's center is not at the center of the shape. I think the way to do this is to use a btCompoundShape with one or more child shapes that have the correct local transforms.
Post Reply