🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

vortxGE 2.0 Particles 2

Published March 15, 2012
Advertisement
I've been working on the particle system again, fixed some issues and added some new features.

Video shows 1000 particles, emit rate 100 every 5 seconds and at death it sets each particles gravity to 0. Not sure what this feature could be used for but I just thought it would be cool to have :-)


[media='640x360']
[/media]


// ################################
// Test Particle system
asset_bs = new lsAsset_BulletShape( vortxge->getAsset_manager() );
asset_bs->Make_Box( 0.5, 0.5, 0.5 );
vortxge->getAsset_manager()->Add_Asset( "bullet/particlebox", asset_bs );

lsParticleEmitter *pe;
pe = new lsParticleEmitter( 1000, vortxge->getOpenGL(), demo_scene );
if( pe )
{
pe->position = lsVector3( 0.0, 25.0, 0.0 );
pe->setDeath_type( LSDT_PARTICLE_GRAVITY );

pe->Set_EmitRate( 100, 5*1000, 10*1000 );
pe->Set_Volume( 20.0, 5.0, 20.0 );

// Add light
demo_scene->setFoundNode(0);
demo_scene->Find_Node( demo_scene, "Spot" );
if( demo_scene->getFoundNode() )
{
lsLight *light = (lsLight*)demo_scene->getFoundNode();
pe->Add_Light( light );
}
// Set mesh
lsAsset_Mesh *amesh;

amesh = (lsAsset_Mesh*)vortxge->getAsset_manager()->Find_Asset( LSAT_MESH, "data/vbm/Cube.vbm" );
if( amesh )
{
pe->mesh = amesh->getMesh();
}
pe->Init( 1.5, asset_bs, demo_scene );
demo_scene->Add_Node( pe );

}

Previous Entry vortxGE 2.0 progress
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

vortxGE : Threads

2446 views

C++11 Threads

3142 views

My Business

2296 views

Still Alive

2110 views

vortxEDIT : video

2229 views

vortxGE : Update

6072 views

vortxEDIT : Save

1988 views
Advertisement