Skip to content

Commit

Permalink
docs(example): add arc3d example to 3d_gizmos
Browse files Browse the repository at this point in the history
Authored-by: RobWalt <robwalter96@gmail.com>
  • Loading branch information
RobWalt committed Jan 26, 2024
1 parent b227f32 commit de7aa29
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion examples/3d/3d_gizmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,20 @@ fn system(
}

my_gizmos
.long_arc_3d_between(Vec3::ZERO, Vec3::ONE, Vec3::NEG_X + Vec3::Y + Vec3::Z)
.long_arc_3d_between(
Vec3::ZERO,
Vec3::ONE,
Vec3::X * time.elapsed_seconds().cos() + Vec3::Y + Vec3::Z,
)
.radius(time.elapsed_seconds().sin().abs())
.color(Color::ORANGE);

my_gizmos
.arc_3d((time.elapsed_seconds().sin() + 1.0) * std::f32::consts::PI)
.radius(0.2)
.center(Vec3::ONE)
.rotation(Quat::from_rotation_arc(Vec3::Y, Vec3::ONE.normalize()))
.segments(10)
.color(Color::ORANGE);

// Circles have 32 line-segments by default.
Expand Down

0 comments on commit de7aa29

Please sign in to comment.