Menu: stylus sticks out of the hand front and matches the touch point; haptic ticks for hover, release, sliders, scrolling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f2fcd0aa2
commit
d0b50fbc41
6 files changed
+95
-6
No files matched your search
@@ -96,12 +96,14 @@ public partial class Locomotion : Node
|
||||
};
|
||||
MeshInstance3D tip = new()
|
||||
{
|
||||
Mesh = new CylinderMesh { TopRadius = 0f, BottomRadius = 0.009f, Height = 0.09f },
|
||||
Mesh = new CylinderMesh { TopRadius = 0.0015f, BottomRadius = 0.008f, Height = MenuScreen.TipLength - MenuScreen.StylusBase },
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
};
|
||||
tip.SetSurfaceOverrideMaterial(0, material);
|
||||
Basis rot = Basis.FromEuler(new Vector3(-Mathf.Pi / 2f, 0, 0));
|
||||
tip.Transform = new Transform3D(rot, rot * new Vector3(0, 0.045f, 0));
|
||||
// From the front of the hand box to exactly the menu's touch point.
|
||||
float mid = (MenuScreen.TipLength + MenuScreen.StylusBase) * 0.5f;
|
||||
tip.Transform = new Transform3D(rot, rot * new Vector3(0, mid, 0));
|
||||
controller.AddChild(tip);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user