POV-Ray : Newsgroups : povray.general : animated projectiles shot while moving : Re: animated projectiles shot while moving Server Time
9 Aug 2024 01:28:05 EDT (-0400)
  Re: animated projectiles shot while moving  
From: Bob Hughes
Date: 1 Sep 2000 03:42:20
Message: <39af5ddc$1@news.povray.org>
"ryan constantine" <rco### [at] yahoocom> wrote in message
news:39AF5509.75964A45@yahoo.com...
| has anyone done this before?  what i want to do is shoot a projectile in
| an animation simply by setting a variable like shoot=true or something
| like that.  then, while it is true, i'd like a shot to be fired at
| either steady or random intervals until set to false.  each shot should
| be its own entity.  it should query the host object to know which
| direction to move and from where it should start.  then it should know
| when it hits something and do something when it does.  the projectile i
| have in mind is a laser blast.  would the particle patch help me here?
| suggestions anyone?

Probably been tried at least.  Sounds a bit like a mix of ranges and
detection; Greg Johnson or Rune Johansen, to name a couple of people, might
have a explanation for you.
I'd say you would use #switch and #range for the main timing and then a #if
conditional to see when a object vector is near the projectile, like
#if(ObjectAreaPosition*ProjectileAreaPosition<ContactDistance).  Takes some
squaring of the area around each to know what space they occupy.
I would think trace() could do fine for this, especially because of the
non-spherical boundaries you would probably want to be using.  But then
there's all the rest involved, such as moving the projectile in the proper
direction.  Long story short, I have yet to do that myself.

Bob


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.