Jannik, you were right .. Here is the thing (bellow) .. Thanks a bunch for
the pointer !!
inline void RadialShooter::shoot(Particle* P) const
{
float theta = _theta_range.get_random();
float phi = _phi_range.get_random();
float speed = _speed_range.get_random();
osg::Vec3 rot_speed = _rot_speed_range.get_random();
P->setVelocity(osg::Vec3(
speed * sinf(theta) * cosf(phi),
speed * sinf(theta) * sinf(phi),
speed * cosf(theta)
));
P->setAngularVelocity(rot_speed);
}
On Sun, Oct 25, 2015 at 7:37 PM, Trajce Nikolov NICK <
[email protected]> wrote:
> Wops, too fast .. Pressed wrong keys
>
> void osgParticle::ModularEmitter::emitParticles(double dt)
> ....
> Particle* P = getParticleSystem()->createParticle(getUseDefaultTemplate()?
> 0: &getParticleTemplate());
> if (P)
> {
> _placer->place(P);
> P->setPosition(P->getPosition() * worldToPs);
> _shooter->shoot(P);
> P->setVelocity(osg::Matrix::transform3x3(P->getVelocity(),
> worldToPs));
>
> if (cps)
> P->setUpTexCoordsAsPartOfConnectedParticleSystem(cps);
> }
>
> On Sun, Oct 25, 2015 at 7:36 PM, Trajce Nikolov NICK <
> [email protected]> wrote:
>
>> Hi Jannik,
>>
>> thanks for the hint. Here is what I see in ModularEmitter:
>>
>>
>> On Sun, Oct 25, 2015 at 7:25 PM, Jannik Heller <[email protected]>
>> wrote:
>>
>>> Hi Nick,
>>>
>>> the particle template's velocity isn't used, it's the particle emitter
>>> that determines initial particle velocity. Have a look at the
>>> ModularEmitter / Shooter classes in osgParticle.
>>>
>>> If you wanted to globally make particles simulate faster (as in a time
>>> lapse) you could just change the osg simulationTime to run faster.
>>>
>>> ------------------
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=65438#65438
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>>
>> --
>> trajce nikolov nick
>>
>
>
>
> --
> trajce nikolov nick
>
--
trajce nikolov nick
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org