Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Nov 18, 2023
1 parent 05777e0 commit ba7c35b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
18 changes: 6 additions & 12 deletions src/joystick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,9 @@ pub fn extract_joystick_node<S: VirtualJoystickID>(
let pos = -data.delta * radius;
let knob_pos = base_pos + joystick_node.axis.handle_vec3(pos.extend(0.));

extracted_uinodes
.uinodes
.entry(entity)
.and_modify(|node| {
node.transform = Mat4::from_translation(knob_pos);
});
extracted_uinodes.uinodes.entry(entity).and_modify(|node| {
node.transform = Mat4::from_translation(knob_pos);
});
}
}

Expand All @@ -183,12 +180,9 @@ pub fn extract_joystick_node<S: VirtualJoystickID>(
continue;
}
let pos = get_base_pos(uinode, joystick_node.behaviour, data, global_transform);
extracted_uinodes
.uinodes
.entry(entity)
.and_modify(|node| {
node.transform = Mat4::from_translation(pos);
});
extracted_uinodes.uinodes.entry(entity).and_modify(|node| {
node.transform = Mat4::from_translation(pos);
});
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ pub fn create_joystick<I: VirtualJoystickID>(
joystick_node: VirtualJoystickNode<I>,
joystick_node_style: Style,
) {
let mut spawn = cmd
.spawn(VirtualJoystickBundle::new(joystick_node).set_style(joystick_node_style));
let mut spawn =
cmd.spawn(VirtualJoystickBundle::new(joystick_node).set_style(joystick_node_style));
let spawn = spawn
.insert(VirtualJoystickInteractionArea)
.with_children(|parent| {
Expand Down

0 comments on commit ba7c35b

Please sign in to comment.