stop fucking formatting my files godot
This commit is contained in:
parent
c8139edf2a
commit
f8f1cbaab7
|
@ -22,6 +22,10 @@ project/assembly_name="nordic25"
|
|||
|
||||
import/blender/enabled=false
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="mobile"
|
||||
|
||||
[xr]
|
||||
|
||||
openxr/enabled=true
|
||||
|
|
|
@ -48,6 +48,7 @@ transform = Transform3D(1, 0, 0, 0, -0.837394, -0.546599, 0, 0.546599, -0.837394
|
|||
shape = SubResource("CapsuleShape3D_74lek")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("2_iyx0m")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.576159)
|
||||
|
||||
[node name="test pellet" parent="." instance=ExtResource("3_iyx0m")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00932735, 0.01, -0.0187979)
|
||||
|
|
|
@ -28,7 +28,6 @@ public partial class Mouth : XRCamera3D
|
|||
return;
|
||||
|
||||
UpdateWeights(body.Mass);
|
||||
|
||||
}
|
||||
catch (System.InvalidCastException)
|
||||
{
|
||||
|
@ -38,10 +37,14 @@ public partial class Mouth : XRCamera3D
|
|||
|
||||
void UpdateWeights(float mass = 0f)
|
||||
{
|
||||
GD.Print("Ate ", mass, "kg");
|
||||
MaxEatWeight += (mass / MaxEatWeight) * EatGrowthFactor;
|
||||
((XROrigin3D)GetParent()).WorldScale = 1.0f / MaxEatWeight;
|
||||
float WorldScale = 1.0f / MaxEatWeight;
|
||||
((XROrigin3D)GetParent()).WorldScale = WorldScale;
|
||||
RightHand.Strength = MaxEatWeight;
|
||||
LeftHand.Strength = MaxEatWeight;
|
||||
GD.Print("New MaxEatWeight: ", MaxEatWeight);
|
||||
GD.Print("New WorldScale: ", WorldScale);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
|
||||
public partial class XRHand : XRController3D
|
||||
{
|
||||
List<Generic6DofJoint3D> joints = new();
|
||||
List<PinJoint3D> joints = new();
|
||||
|
||||
[Export]
|
||||
StaticBody3D body;
|
||||
|
@ -11,16 +11,6 @@ public partial class XRHand : XRController3D
|
|||
[Export]
|
||||
public float Strength = 1.0f;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if ((bool)GetInput("trigger_click"))
|
||||
{
|
||||
}
|
||||
else if (joints.Count > 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPress(string name)
|
||||
{
|
||||
if (name == "select_button")
|
||||
|
@ -46,11 +36,9 @@ public partial class XRHand : XRController3D
|
|||
}
|
||||
|
||||
if (body.Mass > Strength)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Generic6DofJoint3D joint = new();
|
||||
PinJoint3D joint = new();
|
||||
joint.NodeA = GetPathTo(body);
|
||||
joint.NodeB = body.GetPath();
|
||||
joints.Add(joint);
|
||||
|
|
|
@ -11,7 +11,7 @@ public partial class XrOrigin3d : XROrigin3D
|
|||
if (_xrInterface == null || !_xrInterface.IsInitialized())
|
||||
GD.PushError("Failed to initialize OpenXR");
|
||||
|
||||
GD.PushError("OpenXR Initialized successfully");
|
||||
GD.Print("OpenXR Initialized successfully");
|
||||
|
||||
DisplayServer.WindowSetVsyncMode(DisplayServer.VSyncMode.Disabled);
|
||||
GetViewport().UseXR = true;
|
||||
|
|
Loading…
Reference in a new issue