Skip to content

Commit de7aa29

Browse files
committed
docs(example): add arc3d example to 3d_gizmos
Authored-by: RobWalt <[email protected]>
1 parent b227f32 commit de7aa29

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

examples/3d/3d_gizmos.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,20 @@ fn system(
163163
}
164164

165165
my_gizmos
166-
.long_arc_3d_between(Vec3::ZERO, Vec3::ONE, Vec3::NEG_X + Vec3::Y + Vec3::Z)
166+
.long_arc_3d_between(
167+
Vec3::ZERO,
168+
Vec3::ONE,
169+
Vec3::X * time.elapsed_seconds().cos() + Vec3::Y + Vec3::Z,
170+
)
171+
.radius(time.elapsed_seconds().sin().abs())
172+
.color(Color::ORANGE);
173+
174+
my_gizmos
175+
.arc_3d((time.elapsed_seconds().sin() + 1.0) * std::f32::consts::PI)
176+
.radius(0.2)
177+
.center(Vec3::ONE)
178+
.rotation(Quat::from_rotation_arc(Vec3::Y, Vec3::ONE.normalize()))
179+
.segments(10)
167180
.color(Color::ORANGE);
168181

169182
// Circles have 32 line-segments by default.

0 commit comments

Comments
 (0)