adjustable box distance
This commit is contained in:
parent
b3dc63f154
commit
218d5b40f7
2 changed files with 5 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.dofdev.snake"
|
||||
android:versionCode="46"
|
||||
android:versionName="1.50"
|
||||
android:versionCode="48"
|
||||
android:versionName="1.53"
|
||||
android:installLocation="auto"
|
||||
>
|
||||
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="32" />
|
||||
|
|
|
@ -15,6 +15,7 @@ static class Mono
|
|||
public static bool menu = true;
|
||||
|
||||
public static Pose box_pose = new(0, -3 * U.cm, -10 * U.cm);
|
||||
public static float box_dist = 32 * U.cm;
|
||||
public static float box_scale = 1.333f * U.cm;
|
||||
public const int SD_X = 3, SD_Y = 2, SD_Z = 3;
|
||||
public static SpatialArray<int>
|
||||
|
@ -112,11 +113,12 @@ static class Mono
|
|||
break;
|
||||
case BoxMode.Hold:
|
||||
box_pose.position = Rig.r_con_stick.position;
|
||||
box_dist = Vec3.Distance(box_pose.position, Rig.head.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);
|
||||
box_pose.position = Rig.head.position + Rig.head.orientation * V.XYZ(0, -(SD_Y + 0.5f) * box_scale, -box_dist);
|
||||
if (pickup) { box_mode = BoxMode.Hold; }
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue