Collision info

Software: Away3D 4.x

Rope, Newbie
Posted: 03 April 2012 03:02 AM   Total Posts: 5

Hello
I am developing a flash billiard game, and try to use Awayphysics for game physics simulation. I have some question of Awayphysics.

1. How to get the collision information per integration. Because I need to know the collision information to integrate collision audio.

2. Is AwayPhysics support flash player v10.x in the future?

3. How to build AwayPhyscics.swc or it’s source code will release in the future?

Sorry, I am surveying the alchemy tool and trying to build AwayPhyscics.swc now. Please ignored Issue 1 and 3. TKS

   

Avatar
kurono, Sr. Member
Posted: 03 April 2012 10:48 PM   Total Posts: 103   [ # 1 ]
// assume, you have this:
var physics:AWPDynamicsWorld;

// do some initializations...

// let's allow ability to listening for collisions
physics.collisionCallbackOn true;

// assume, the "ball" is a billiard ball
var ball:AWPRigidBody;

// and add listener for the "COLLISION_ADDED" event
ball.addEventListener(AWPCollisionEvent.COLLISION_ADDED, function (e:AWPCollisionEvent):void {
    trace
('play \'beep\' sound!');
   
}); 
   

Rope, Newbie
Posted: 05 April 2012 03:50 AM   Total Posts: 5   [ # 2 ]

update 2012/4/5
I want to use awayphysics in FP10.x.

So, I try to build awayphysics.swc but there are many error and problem.

Step as follow…

1. Install python v2.7 and scons v2.1

2. Open cmd.exe and enter awayphysics-core-fp11\alchemy dir

3. Run the C:\Python27\Scripts\scons.bat

Did someone build it?

————————————————————————————————-
TKS! kurono

I will try it later.

^^

   

Avatar
kurono, Sr. Member
Posted: 05 April 2012 06:02 PM   Total Posts: 103   [ # 3 ]

It’s impossible to use awayphysics if FlashPlayer’s version is below 11.

   

Rope, Newbie
Posted: 12 April 2012 02:37 AM   Total Posts: 5   [ # 4 ]

kurono: Sorry for the delay in replying…

I tried it(collision callback) and it work well. Thank you very much!!!!

BTW, I tried use awayphysics(need some modification) in FlashPlayer’s v10.2 too, it seems work too. All bodies are collided each other and the physics world integrated.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X