Use extend to convert vec2 to vec3
This commit is contained in:
parent
1c787d17ff
commit
4371f02949
1 changed files with 1 additions and 2 deletions
|
@ -34,7 +34,6 @@ impl Plugin for MovementPlugin {
|
|||
|
||||
fn update_position(mut query: Query<(&Velocity, &mut Transform)>, time: Res<Time>) {
|
||||
for (velocity, mut transform) in query.iter_mut() {
|
||||
// TODO: convert vec2 to vec3 with a zero Z value?
|
||||
transform.translation += velocity.0 * time.delta_seconds();
|
||||
transform.translation += (velocity.0 * time.delta_seconds()).extend(0.);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue