I have an entity that contains a bone and I'm emitting particles from its location, mainly downwards.

1. Now when I rotate my entity and (I think) the bone with it, the particles keep going down. I would like the particle direction to stick to the entity's vector.
Could it be the nullvector when running the effect? I couldn't get it to change so far.

2. Now my second problem is that I have an engine part that is also rotated by a bone, but it should always point down. Can I give a bone an absolute direction vector?

Thx for your help

... for 1:
Code:
function thrusterEffect_spec_fun(PARTICLE* p)
{
if(p.size > 0) { p.size -= 0.262 *time_step; }else{p.lifespan = 0; }
   my.alpha -= 20 *time_step;
   if(p.alpha < 0) { p.alpha = 0; p.lifespan = 0; }
}

function thrusterEffect_variables(PARTICLE* p)
{
	

    p.blue = 128 ;
    p.green = 128 ;
    p.red = 128 ;
    p.vel_x = random( 1 ) - 1 ;
    p.vel_y = random( 1 ) - 1 ;
    p.vel_z = random( -10*Geschw );
    p.size = 5 ;
    p.alpha = 50 ;
    p.gravity = 0 ;
    set(p, BRIGHT|TRANSLUCENT|MOVE);
    p.event = thrusterEffect_spec_fun;
}


function thrusterEffect()
{
  while(1)
  {
     particleCount = 40;
     
   vec_for_bone(PartFront,my,"PartPosFront");						//setzt den Partikelursprung auf den bestimmten Bone
	vec_for_bone(PartBackL,my,"PartPosBL");							//setzt den Partikelursprung auf den bestimmten Bone
	vec_for_bone(PartBackR,my,"PartPosBR");							//setzt den Partikelursprung auf den bestimmten Bone
     
     effect(thrusterEffect_variables,maxv(1,particleCount*time_step),PartFront,nullvector);
         effect(thrusterEffect_variables,maxv(1,particleCount*time_step),PartBackL,nullvector);
				effect(thrusterEffect_variables,maxv(1,particleCount*time_step),PartBackR,nullvector);

     wait(1);
  }
}


action simplePart_action()
{
  thrusterEffect();

}


Last edited by Hitsch; 11/05/08 20:13.