|
|
John D. Gwinner wrote:
>
> I want to do something like a brick wall that collapses or gets blown
> apart.
>
> I could use some of the particle system's out there, but the bricks
> would have to 'rotate' a bit when they fall. Bouncing wouldn't happen
> much, but they should twist as they fall.
>
> Any suggestions?
Assign a particle to each end of each brick (two per brick). Take the
difference in starting location, and their difference in starting
velocity.
Take the cross-product of these two vectors. Use the direction of the
cross product as the axis of rotation, and the magnitude of the vector
for the rate of rotation for the bricks. Rotate them around the
axis (using the clock, times the magnitude, times a constant scaling
factor, as the rotation angle), and then translate them to their
location.
Hope this helps,
John
--
ICQ: 46085459
Post a reply to this message
|
|