Object name from property collision?

Hi All,

In python is there any way to get an object name from a property collision?


if floorTouch.positive:
	print floorTouch.OBJECTNAME

I’m basically trying to get the coordinates from an object I’ve collided with.

What would be even better is if it’s possible to get the coordinates of a collision. Is this possible?

Thanks! :slight_smile:

I solved this using Rays for my particular problem, though it would still be useful to know the answer…

Um, it’s the same thing for collision.

if collision.positive:
     print collision.hitObjectList


if collision.positive:
     print collision.hitObject

I think that might work… not totally sure though…

If you ever need any code, just go here:

It gives you all the sintax for 2.49b and hopefully 2.6 (when it comes out)