mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'spawn_offset' particles parameter
This commit is contained in:
parent
d8bbbc3cfb
commit
3331d4deee
3 changed files with 9 additions and 10 deletions
|
|
@ -103,6 +103,7 @@ void Emitter::update(
|
|||
|
||||
glm::vec3 spawnOffset = generate_coord(preset.spawnShape);
|
||||
spawnOffset *= preset.spawnSpread;
|
||||
spawnOffset += preset.spawnOffset;
|
||||
|
||||
particle.position = position + spawnOffset;
|
||||
particle.lifetime *= 1.0f - preset.lifetimeSpread * random.randFloat();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue