You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Rotation part of ParticleEffect's GlobalTransform does not rotate velocity of spawned particles. Seems like #43 should've fixed that, but maybe there was a regression ? Or I'm misunderstanding something.
Expected behavior
Particles rotate towards emitter's own rotation.
To Reproduce
Here is a diff for examples/spawn_on_command:
Diff
diff --git a/examples/spawn_on_command.rs b/examples/spawn_on_command.rs
index 7b4c0b5..b42497d 100644
--- a/examples/spawn_on_command.rs+++ b/examples/spawn_on_command.rs@@ -242,10 +235,11 @@ fn update(
let color = 0xFF000000u32 | (b as u32) << 16 | (g as u32) << 8 | (r as u32);
properties.set("spawn_color", color.into());
- // Set the collision normal- let normal = normal.normalize();- info!("Collision: n={:?}", normal);- properties.set("normal", normal.extend(0.).into());++ // Set the collision rotation+ properties.set("normal", Vec3::X.into());+ effect_transform.look_at(transform.translation + normal.extend(0.0), Vec3::Y);+ info!("Rotation = {:?}", effect_transform.rotation);
// Spawn the particles
spawner.reset();
The text was updated successfully, but these errors were encountered:
Crate versions
bevy
version: 0.14.1bevy_hanabi
version: 0.12.2Describe the bug
Rotation part of
ParticleEffect
'sGlobalTransform
does not rotate velocity of spawned particles. Seems like #43 should've fixed that, but maybe there was a regression ? Or I'm misunderstanding something.Expected behavior
Particles rotate towards emitter's own rotation.
To Reproduce
Here is a diff for
examples/spawn_on_command
:Diff
The text was updated successfully, but these errors were encountered: