Fabrice <[EMAIL PROTECTED]> wrote:
> I have a moving car, when car accelerate i want some
> exaust gas, via particle effect.
> Now i have the car with an exaust tube (thats the model position i need), a
> good looking exaust particle. But i cannot yet paste it on the right spot.

Hi Fabrice,

If you are using a cylinder model as the exhaust pipe its position will be
at the centre of the cylinder.  The centre of the end of the cylinder will
be half the height of the cylinder along its y-axis.  In pseudo-Lingo:

on createCarModel(a3DMember)
   ...

   exhaustModel  = a3DMember.newModel("Exhaust", aCylinderResource)
   particleModel = a3DMember.newModel("Particle", aParticle rResource)
   halfHeight    = vector(0, exhaustModel.resource.height / 2, 0)
   
   exhaustModel.addChild(particleModel)
   particleModel.translate(halfHeight)

   exhaustModel.rotate(90, 0, 0)
   -- The exhaust should now emit particles to the left
  
   ...
end


However...

If the particle resource is a child of the exhaust pipe or of the car
itself, then the particles will first be emitted backwards and then travel
along with the car.  To get the particles to appear to be part of the world,
you need to change the emitter.region property continuously.

Here are two examples of this technique:

http://perso.planetb.fr/newton/snowbox.dir
http://perso.planetb.fr/newton/flame.dir

Cheers,

James


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to