Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
loll

new physics2d plugin

Recommended Posts

Hi,

 

I have a question about the new physics2d plugin. I looked at the demo of it and i think i understand how it works, however, im wondering if it is possible to take it a step further and use it with ricochet. as in, can i make movieclips that are set in motion by the physics2d bounce off and/or set other movieclips in motion based on the speed,angle etc of the tween? also is it possible to slow and/or stop if the movieclip crosses through another clip?

 

can i do this with the physics2d or do i need to use another method?

Link to comment
Share on other sites

No. physics2D is NOT meant to be a full-blown particle system. It wouldn't be appropriate or efficient quite frankly. Otherwise each tween would have to be aware of all the other tweens and other objects on the stage and watch for collisions, etc. which takes a lot more processing and code which would bloat the file size. I may eventually create a particle system, but it would be separate and distinct from the tweening platform because they tackle very distinct issues.

 

physics2D simply gives you the ability to control the motion/tweening of the target object based on basic physics properties (velocity, angle, friction and gravity or acceleration, accelerationAngle).

 

If you want to add an onUpdate to the tween and add your own code that checks for collisions, you can.

Link to comment
Share on other sites

  • 1 year later...

Just for reference I have done exactly this here:-

 

http://www.ourtestsite.org/antigravitysnowballgame/

 

It seems to work o.k. It simply looks for the collision and then kills all tweens and makes a new one using calculated angles.

 

My problem now is that I need to be able to grab the speed of the apple at any point???

 

Thanks

 

Will

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×