diego1996 / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

It would be nice to have a logic node to handle (physics) collision. #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is not support to register a gkLogicNode in order to get notifications 
for collisions...

Original issue reported on code.google.com by silveira.nestor@gmail.com on 19 Feb 2010 at 2:50

GoogleCodeExporter commented 9 years ago
This could be accomplished with the implementation of the scene listener.

I have the code locally in order to notify callbacks of physics listeners, or if
callbacks are not desired you can go straight to the bullet source and use
scene->getDynamicsWorld()->getBulletWorld() and extract from bullet
you will also need access to btDispatcher, I believe 

Original comment by snailr...@gmail.com on 19 Feb 2010 at 3:07

GoogleCodeExporter commented 9 years ago
I need to add the collision sensor, so I will add support for this real soon.

Original comment by snailr...@gmail.com on 19 Feb 2010 at 3:13

GoogleCodeExporter commented 9 years ago
Changed ownership to myself...

Original comment by snailr...@gmail.com on 19 Feb 2010 at 3:15

GoogleCodeExporter commented 9 years ago

Best is to gather the contact information in a single pass for all objects / 
sensors 
that need it, using one of the techniques described here:
http://bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Callbacks_and_Trigg
ers

Generally, just iterating over all contact manifolds is a good bet. If you have 
a 
sensor with a volume, you could consider a ghost object too (I think that's how 
it is 
implemented in Blender).

Original comment by erwin.coumans on 19 Feb 2010 at 4:27

GoogleCodeExporter commented 9 years ago
I've been using the method in Bullet/Demos/CollisionInterfaceDemo. I will check 
out
ghost objects now too.

My plan is to add a method to gkDynamicsWorld with something like
gkDynamicsWorld::getColliders() then with the collision sensor dispatcher, 
notify
connected sensors and allow individual sensors the ability to filter results.

Original comment by snailr...@gmail.com on 19 Feb 2010 at 5:04

GoogleCodeExporter commented 9 years ago

Original comment by snailr...@gmail.com on 12 Jun 2010 at 2:44