Darkplaces pointparticles() velocity issue.
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Darkplaces pointparticles() velocity issue.
Hello All,
I assume this is the better place to post about my issue, but the "Mapping" forum might have been applicable also.
What I'm trying to do, is quite simple really, I'm attempting to add decorative sparks to a map. I've had no trouble creating the entity for my BSP editor,
or the QC required to drive it in-game.
The problem I'm having is making the particles use the velocity paramater of DP pointparticles.
Here's the QC I created (on the quick, I must admit) to drive the sparks in a map:
Heres the EffectInfo for 'map_sparks':
Now, if you notice, the velocity paramater of pointparticles() is set as '300 0 0', so in the map, I would expect the particles to fly off to one side.
However, what actually happens, is that the particles spawn as expected, but just travel on the Z axis. What I dont get, is why they dont travel on the X or Y axis?
Here's a very dodgy screenshot, the bright yellow blob is meant to be the sparks.

So, I'm looking for a little help understanding why the velocity paramater doesnt appear to be working correctly, maybe it's my QC/EffectInfo, or is it really an issue with DarkPlaces?
I assume this is the better place to post about my issue, but the "Mapping" forum might have been applicable also.
What I'm trying to do, is quite simple really, I'm attempting to add decorative sparks to a map. I've had no trouble creating the entity for my BSP editor,
or the QC required to drive it in-game.
The problem I'm having is making the particles use the velocity paramater of DP pointparticles.
Here's the QC I created (on the quick, I must admit) to drive the sparks in a map:
- Code: Select all
void() spark_tick =
{
local float fxnum;
// Get particle effect number
fxnum = particleeffectnum("map_sparks");
// Spawn particle effect
pointparticles( fxnum, self.origin, '300 0 0', 5 );
self.nextthink = time + 0.7 + random();
};
void () misc_sparks =
{
self.nextthink = time + 0.7 + random();
self.think = spark_tick;
};
Heres the EffectInfo for 'map_sparks':
- Code: Select all
effect map_sparks
count 15
type spark
color 0x8f4333 0xfff31b
size 0.4 0.4
alpha 0 256 768
gravity 1
bounce 1
velocityoffset 0 0 80
velocityjitter 32 32 32
Now, if you notice, the velocity paramater of pointparticles() is set as '300 0 0', so in the map, I would expect the particles to fly off to one side.
However, what actually happens, is that the particles spawn as expected, but just travel on the Z axis. What I dont get, is why they dont travel on the X or Y axis?
Here's a very dodgy screenshot, the bright yellow blob is meant to be the sparks.

So, I'm looking for a little help understanding why the velocity paramater doesnt appear to be working correctly, maybe it's my QC/EffectInfo, or is it really an issue with DarkPlaces?
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
- Qrv
- Posts: 45
- Joined: Thu Oct 20, 2011 7:43 am
- Location: Stuck in a Slipgate.
Re: Darkplaces pointparticles() velocity issue.
could be a precision issue with them bouncing inside the wall
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: Darkplaces pointparticles() velocity issue.
Although you cant see it very well in that screenie, the emitter entity is a good 64 units clear of the wall/floor/ceiling.
The EffectInfo is a clone of TE_GUNSHOT sparks, as that spark poof was what I was looking to start with, the reason I want to use velocity is
so it looks a bit better when actually pushed up to a wall panel, to simulate a sparking electric panel, for example, coming 'out' the wall panel.
The EffectInfo is a clone of TE_GUNSHOT sparks, as that spark poof was what I was looking to start with, the reason I want to use velocity is
so it looks a bit better when actually pushed up to a wall panel, to simulate a sparking electric panel, for example, coming 'out' the wall panel.
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
- Qrv
- Posts: 45
- Joined: Thu Oct 20, 2011 7:43 am
- Location: Stuck in a Slipgate.
Re: Darkplaces pointparticles() velocity issue.
My guess is that velocitymultiplier defaults to zero, hence your velocity parameter is effectly ignored. It moves in the Z direction due to velocityoffset which has 80 in the Z component.
Try adding the following line to the EffectInfo
Try adding the following line to the EffectInfo
- Code: Select all
velocitymultiplier 1
- andrewj
- Posts: 133
- Joined: Mon Aug 30, 2010 3:29 pm
- Location: Australia
Re: Darkplaces pointparticles() velocity issue.
/facepalm
Thanks Andrewj, that solved it very nicely.
The effect I was looking to achieve, although very rough at this time till I'm done tweaking:

The ability to use dlights with the particle system is truely genius!
Thanks Andrewj, that solved it very nicely.
The effect I was looking to achieve, although very rough at this time till I'm done tweaking:

The ability to use dlights with the particle system is truely genius!
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
- Qrv
- Posts: 45
- Joined: Thu Oct 20, 2011 7:43 am
- Location: Stuck in a Slipgate.
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest