raycast function to test the collsion

Software: Away3D 4.x

zhiqiangxu, Newbie
Posted: 19 September 2011 07:12 AM   Total Posts: 20

I want to use the raycast function to test the collsion,how can i add it to the action script 3 project?

   

Yang Li, Administrator
Posted: 19 September 2011 02:24 PM   Total Posts: 80   [ # 1 ]

raycast have not added to awayphysics yet. will add in the future.

   

Avatar
Alejandro Santander, Administrator
Posted: 20 September 2011 12:06 AM   Total Posts: 414   [ # 2 ]

The tools/utils package contains a class called Ray.as, that might have what you need.

You can use it to define a Ray and check if it intersects a sphere or a triangle. It could be extended to detect collisions in a variety of other objects such as aabb’s or obb’s I guess.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X