switch case boxmode
This commit is contained in:
parent
bf66637bce
commit
509449da84
1 changed files with 13 additions and 6 deletions
19
src/Mono.cs
19
src/Mono.cs
|
@ -75,13 +75,20 @@ static class Mono
|
|||
Rig.head.orientation * Vec3.Forward,
|
||||
Vec3.Direction(box_pose.position, Rig.head.position)
|
||||
) < 15.0f);
|
||||
switch (box_mode)
|
||||
{
|
||||
box_pose.position = Rig.r_con_stick.position;
|
||||
}
|
||||
else
|
||||
{
|
||||
// orbital_view
|
||||
box_pose.position = Rig.head.position + Rig.head.orientation * V.XYZ(0, -(SD_Y + 0.5f) * box_scale, -32 * U.cm);
|
||||
case BoxMode.Float:
|
||||
if (pickup) { box_mode = BoxMode.Hold; }
|
||||
break;
|
||||
case BoxMode.Hold:
|
||||
box_pose.position = Rig.r_con_stick.position;
|
||||
if (Rig.btn_grip.delta == -1) { box_mode = in_cone.state ? BoxMode.Mount : BoxMode.Float; }
|
||||
break;
|
||||
case BoxMode.Mount:
|
||||
// orbital_view
|
||||
box_pose.position = Rig.head.position + Rig.head.orientation * V.XYZ(0, -(SD_Y + 0.5f) * box_scale, -32 * U.cm);
|
||||
if (pickup) { box_mode = BoxMode.Hold; }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue