mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add 'min_angular_vel', 'max_angular_vel' properties
This commit is contained in:
parent
6ac088f7b9
commit
7f95306c65
5 changed files with 17 additions and 0 deletions
|
|
@ -88,6 +88,11 @@ void Emitter::update(
|
|||
particle.angle =
|
||||
random.randFloat() * preset.angleSpread * glm::pi<float>() * 2;
|
||||
}
|
||||
particle.angularVelocity =
|
||||
(preset.minAngularVelocity +
|
||||
random.randFloat() *
|
||||
(preset.maxAngularVelocity - preset.minAngularVelocity)) *
|
||||
((random.rand() % 2) * 2 - 1);
|
||||
|
||||
glm::vec3 spawnOffset = generate_coord(preset.spawnShape);
|
||||
spawnOffset *= preset.spawnSpread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue