Wednesday, March 25, 2009

Papervision 3D + Physics Rotation Easing

This turned out to be easier that I expected. The AbstractParticle class which CircleParticle inherits from, implements a velocity property in the form of a vector. SO the only thing left was using the X & Y components of the vector as inputs on the Matrix3D.rotationX & Matrix3D.rotationY transformation Matrixes.

A by-product of tying translation to rotation, which, thinking about it it's just the way it is in the real world, is that bounces automatically change rotation direction as the sphere changes translation directions. It also ensures the perfect synch between rotation speed and rotation speed, so once the correct matching ratio between the two velocities is found, it works perfectly.

Here it it the result:


1 comment:

  1. some things need a comment; and this is one - nice work, nice effect, love the way you went for the real appoach - the simple one.

    all in nice one - you should publish the source :p

    congrats on the new fatherhood (got a few myself)!

    nath

    ReplyDelete