Game Development Community

Particle Size?

by Richard_H · in Torque Game Engine · 01/24/2007 (7:11 pm) · 1 replies

Hi,

for my game I have objects constantly changing size and I want the particles they emit to change with them. I'm using a modded hover vehicle and I'm trying to change the size of the dust particles.
This is some of the code I have for setting the size in the HoverVehicle::updateDustTrail function.
F32 size = this->getScale().len();
F32 sizeList[ParticleEngine::PC_SIZE_KEYS];
sizeList[0].set( size * 1.75);
sizeList[1].set( size * 0.75);
sizeList[2].set( size * 0.50);
It is giving me an error about the .set functions. It seems that it can't have non-integer sizes, yet my datablocks don't use integers.
How would I best be able to accomplish this?

#1
01/25/2007 (3:47 am)
I fixed the error, but the new sizes appear to be getting ignored. Here is what I have now:
F32 sizeList[ParticleEngine::PC_SIZE_KEYS];
sizeList[0] = ( objSize );
sizeList[1] = ( objSize );
sizeList[2] = ( objSize );

mDustTrailEmitter->setSizes( sizeList );
Am I doing anything wrong?