changed: altered camera settings
This commit is contained in:
@@ -147,7 +147,7 @@ public class Vector3CameraValueGroupDrawer : ObjectDrawer<Vector3CameraValueGrou
|
||||
|
||||
// Start the Vertical layout then add the label before adding a horizontal so the label will be on top of side-by-side options
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label(_instance.ToString(), labelOptions);
|
||||
GUILayout.Label(_instance.label, labelOptions);
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
// Create the x settings enum
|
||||
@@ -220,7 +220,7 @@ public class Vector2CameraValueGroupDrawer : ObjectDrawer<Vector2CameraValueGrou
|
||||
|
||||
// Start the Vertical layout then add the label before adding a horizontal so the label will be on top of side-by-side options
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label(_instance.ToString(), labelOptions);
|
||||
GUILayout.Label(_instance.label, labelOptions);
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
// Create the x settings enum
|
||||
@@ -326,8 +326,9 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
public class ChangeCameraSettings : ActionTask{
|
||||
[ParadoxNotion.Design.Header("Main Settings")]
|
||||
public FloatCameraValueGroup fieldOfView = new (newLabel: "FOV");
|
||||
|
||||
[ParadoxNotion.Design.Header("Orbit Follow Ring Settings")]
|
||||
|
||||
[ParadoxNotion.Design.Header("Orbit Follow Ring Settings"), Space (5)]
|
||||
public Vector3CameraValueGroup orbitPositionDamping = new(newLabel: "Position Damping");
|
||||
public OrbitalFollowValueGroup orbitFollowTop = new (newLabel: "Top");
|
||||
public OrbitalFollowValueGroup orbitFollowCenter = new (newLabel: "Center");
|
||||
public OrbitalFollowValueGroup orbitFollowBottom = new (newLabel: "Bottom");
|
||||
@@ -336,7 +337,7 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
public Vector2CameraValueGroup screenPosition = new (newLabel: "Screen Position");
|
||||
|
||||
[ParadoxNotion.Design.Header("Camera Offset Settings")]
|
||||
public Vector3CameraValueGroup cameraOffset = new (newLabel: "Screen Position");
|
||||
public Vector3CameraValueGroup cameraOffset = new (newLabel: "Offset");
|
||||
|
||||
//Use for initialization. This is called only once in the lifetime of the task.
|
||||
//Return null if init was successfull. Return an error string otherwise
|
||||
@@ -461,6 +462,34 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
break;
|
||||
}
|
||||
|
||||
// Position Damping
|
||||
switch (orbitPositionDamping.changeX) {
|
||||
case CameraSettingsToggle.NewValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.x = orbitPositionDamping.newValue.x;
|
||||
break;
|
||||
case CameraSettingsToggle.ResetValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.x = CameraSettingsProcessor.values.orbitPositionDamping.originalValue.x;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (orbitPositionDamping.changeY) {
|
||||
case CameraSettingsToggle.NewValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.y = orbitPositionDamping.newValue.y;
|
||||
break;
|
||||
case CameraSettingsToggle.ResetValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.y = CameraSettingsProcessor.values.orbitPositionDamping.originalValue.y;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (orbitPositionDamping.changeZ) {
|
||||
case CameraSettingsToggle.NewValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.z = orbitPositionDamping.newValue.z;
|
||||
break;
|
||||
case CameraSettingsToggle.ResetValue:
|
||||
CameraSettingsProcessor.values.orbitPositionDamping.targetValue.z = CameraSettingsProcessor.values.orbitPositionDamping.originalValue.z;
|
||||
break;
|
||||
}
|
||||
|
||||
EndAction(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user