Hey,
I have this problem where I cant rotate the sprites im inserting to spawned bullet entities using the 3d sprite crate:
https://github.com/FraserLee/bevy_sprite3d
tried using the method with_rotation on transform but no success. systemlooks like this:
q: Query<(Entity, &Position, &Rotation), (With<BulletMarker>, Added<Collider>)>,
mut commands: Commands,
scene_assets: Res<SceneAssets>,
asset_server: Res<AssetServer>,
mut sprite_params: Sprite3dParams,
) {
let laser_handle = scene_assets.lasers.clone();
for (entity, pos, rot) in q.iter() {
println!("pos: {:?}, rot: {:?}", pos.0, rot.0);
// Spawn left laser
commands.entity(entity).insert(
Sprite3d {
image: laser_handle.clone(),
alpha_mode: AlphaMode::Blend,
transform: Transform::from_translation(pos.0)
.with_rotation(rot.0)
.with_scale(Vec3::splat(5.0)),
..default()
}
.bundle(&mut sprite_params),
);
}
}````
also tried other methods where I set the rotation manually without using the `rot` variable im querying in but it has no effect on the rotation/orientation of the sprite.
println comes out looking like this:
```pos: Vec3(15.582591, 0.0, 6.8688116), rot: Quat(0.0, 0.45316583, 0.0, -0.8914262)```
any suggestions what more methods I can try?