RenderParticle runs ahead of model despite...

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

Post Reply
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

RenderParticle runs ahead of model despite...

Post by rrTea »

..."FollowModel" turned off.

I'd expect that unticking RenderParticles / FollowModel tickbox means the particles will go on about their business independently from the model that draws them in its OnRender once the particle is launched.

But if the particles are rendered first, the particles source actually moves ahead of the model, and the particles themselves keep moving too. Example below. Note that by the time the model reaches the right hand edge of the screen, the particle sprayer is quite ahead of the model.

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?> 
<ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0.4627 0.7373 0.9608 1" FrameRateStyle="2" FixedFrameRate="60" CameraPosition="0 0 5" NoSound="1"> 
  <OnLoaded> 
    <SpawnModel Model="Glow"/> 
  </OnLoaded> 
  <OnUpdate> 
    <ZExpression Comment="Glitter Liveliness" Expression="ColorMonoGlowy.Color.A = 0.2+rnd()*0.8;"/> 
  </OnUpdate> 
  <Content> 
    <Material Name="ColorMonoGlowy" Shading="1" Color="1 1 1 0.3414" Light="0" Blend="2"/> 
    <Model Name="Glow" Velocity="0.2 0 0" Scale="0.25 0.25 1"> 
      <OnRender> 
        <UseMaterial Material="ColorMonoGlowy"/> 
        <RenderParticles ParticlesPerSecond="10" Spread="3.14" ParticleWidth="0.75" ParticleHeight="0.75" Speed="0.5" SpeedRange="0.2" ParticleLifetime="1" AnimateAlpha="-1" AnimateSize="-0.5" FollowModel="0"/> 
        <UseMaterial Material="ColorMonoGlowy"/> 
        <RenderSprite/> 
      </OnRender> 
    </Model> 
  </Content> 
</ZApplication>
User avatar
VilleK
Site Admin
Posts: 2318
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Hi, there is a bug that causes this problem if particles are rendered first. It will be fixed in next update. Thanks for reporting.
Post Reply