Skip to main content
gamedev.net
🔒 Locked

Intelligent Area

Started by neilski_2003 Apr 12, 2006 at 2:54 AM 1 replies 450+ views
Original Post
neilski_2003
neilski_2003
Hi guys, I am currently attempting a little collison detection and have got the basic collisions going between two spheres and also between a sphere and a plane. Anyhow what i wish to do is have it so that rather than have the usual bounce back response when it hits the plane i would like the ball to dissapear/ be destroyed to give the effect of a ball being potted or more accurately putted. Does anyone have any idea how to do this or wher i could find out? My current collision detection says; if (Cball.collide(plane1)) Cball.response(Rball, plane1.norm, e); Rather than that i would like to destroy the ball on contact with the plane. Cheers guys. Neil
zedzeek
zedzeek
nothing to do with gl, but u want something like

if (Cball.collide(plane1))
Cball.state = DESTROY_BALL;

/////
ball_update()
{
if ( state == DESTROY_BALL )
do necessary destruction


}
Asuralm
Asuralm
Maybe you can build the sphere by using a particle system. Use the physical simulation to make the motion. When the sphere contact with the plane, the particles scattered and after a certain time, lives of particles die. There are lots of fire flame examples in the internet which probably is what you want for the destroy process.
Hope this helps
if (Cball.collide(plane1))Cball.state = DESTROY_BALL;/////ball_update(){if ( state == DESTROY_BALL )   ScatterProcess();}
Asura

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.