Q? getting the co-ordinates of collisions?

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
kirado2
Posts: 7
Joined: Thu Jul 20, 2006 11:23 am

Q? getting the co-ordinates of collisions?

Post by kirado2 »

Hi Erwin.. (kirado from eleysian emoticon':)').. I was wondering is it possibled to get the 3d co-orinates of the collision points? eg. where in space a ball collides with the ground. Is there a script function to do this?

I want to use this info to add in particle like objects at these points.. or at least add the objects and then move them to these co-ordinates somehow?
pHalanx
Posts: 5
Joined: Wed Jul 12, 2006 3:32 am

Post by pHalanx »

hey kirado,

Here is a .blend file that you could use: Add Object

Peace

P.S: Oh, but I'm not exactly sure how one would stop adding objects if the ball was just on the ground. I could probably set something up in python, but oh well.
kirado2
Posts: 7
Joined: Thu Jul 20, 2006 11:23 am

Post by kirado2 »

hey thanks that looks cool..! So you have made the balls position a global variable and because you know the balls radius/diammeter you used this info to figure out where to add the objects in?

Quite cool. It will help me make dust particles as the ball hits the ground.My ball rotates in 3d etc.. rolls around and hits into multiple pillars.. I can post a blend of it if you want to have a look.. to get the effect I would like I need to get multiple collision points.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

I used to have some debugging option / python call to get all contact points for an object. It's not enabled at the moment, we can enable this for next version.
kirado2
Posts: 7
Joined: Thu Jul 20, 2006 11:23 am

Post by kirado2 »

Hey Erwin -thanks for replying.. that would be great to get those co-ordinates.. really usefull for doing nice particles based on the collision points! Maybe something that lets you choose between adding in objects at the center of the object or at the collision points.. for future versions etc etc.