Detect multiple collisions

Software: Away3D 4.x

rthompson, Newbie
Posted: 20 December 2012 08:59 PM   Total Posts: 9

Is there a way to detect all of the bodies a body collides with (e.g. the player in a corner where the floor and wall are separate bodies)?  I suppose you could attach listeners to each object but what i’m really looking for is a way to get a list of objects that intersect a ray; doesn’t seem like the ray functionality does this?

Thanks.

   

rthompson, Newbie
Posted: 03 January 2013 10:00 PM   Total Posts: 9   [ # 1 ]

Maybe I’m an idiot…

How I got around this issue was to have an array associated with my player, in which every frame a AWPEvent.COLLISION_ADDED fires I push the object into the array.

Then before each new call to physicsWorld.step() you clear the array.  Obviously not ideal, but it works.  I was pretty disappointed in the lack of ray casting functionality (which would have solved my specific problem, albeit not the one I described in the first post).

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X