Calculation of collisions in 3D

Software: Away3D 4.x

ActionFrob, Newbie
Posted: 28 November 2012 09:34 PM   Total Posts: 10

Hi @all!

I want to know if it’s possible with given away3d methods to calculate if two - let’s say- cubes collide or intersect. I thought about this and it would be very helpful for me if there are available methods.
My use case is that i want to stop dragging if my two cubes would collide.
Thanks in advance!

   

Rasterizer, Member
Posted: 29 November 2012 06:09 AM   Total Posts: 69   [ # 1 ]

AwayPhysics wouldn’t solve your problem ?
Mind you, I only just started with Away3D and I only have experience with Box2D and Nape, but both engines had listeners for this kind of event, so I’m sure AP does have something similar.
On second thought, if AP is a no-go for some reason, maybe you could extend Away3D with a method that takes 2 bounding boxes as arguments and checks if there’s an intersection. This would be very fast and quite inaccurate, of course. Depends on your expectations.

   

ActionFrob, Newbie
Posted: 29 November 2012 08:42 AM   Total Posts: 10   [ # 2 ]

Hi,

thank you! I’m new to Away3D too. I’ll give AwayPhysics a try. Sounds good.

My first attempt to this was to use the containsPoint method from the BoundingVolumeBase class, but it stayed a attempt :D

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X