added: environment observer changes for grapple

This commit is contained in:
Chris
2025-08-01 11:36:19 -04:00
parent 80276fbdbf
commit 78498e5212
5 changed files with 62 additions and 14 deletions

View File

@@ -12,15 +12,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
m_Name: GrappleAimBT
m_EditorClassIdentifier:
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"_position":{"x":730.5245,"y":284.5939},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"_condition":{"actionName":{"_value":"Grapple"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_position":{"x":498.9515,"y":429.918},"$type":"NodeCanvas.BehaviourTrees.WaitUntil","$id":"1"},{"_action":{"fieldOfView":{"label":"FOV","value":60.0,"changeValue":1},"orbitFollowTop":{"label":"Top","changeHeight":1,"height":2.0,"changeRadius":1,"radius":2.0},"orbitFollowCenter":{"label":"Center","changeHeight":1,"height":1.5,"changeRadius":1,"radius":2.4},"orbitFollowBottom":{"label":"Bottom","changeHeight":1,"height":0.7,"changeRadius":1,"radius":2.0},"cameraOffset":{"label":"Screen
Position","newValue":{"x":2.0,"z":-1.0},"changeX":1,"changeZ":1},"$type":"NodeCanvas.Tasks.Actions.ChangeCameraSettings"},"_position":{"x":527.6321,"y":581.3029},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"2"},{"_action":{"waitTime":{"_value":0.3},"$type":"NodeCanvas.Tasks.Actions.Wait"},"_position":{"x":682.4366,"y":430.895},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"3"},{"_condition":{"actionName":{"_value":"Grapple"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_position":{"x":826.7462,"y":427.8908},"$type":"NodeCanvas.BehaviourTrees.WaitUntil","$id":"4"},{"_action":{"fieldOfView":{"label":"FOV","changeValue":2},"orbitFollowTop":{"label":"Top","changeHeight":2,"changeRadius":2},"orbitFollowCenter":{"label":"Center","changeHeight":2,"changeRadius":2},"orbitFollowBottom":{"label":"Bottom","changeHeight":2,"changeRadius":2},"screenPosition":{"label":"Screen
Position","changeX":2,"changeY":2},"cameraOffset":{"label":"Screen Position","changeX":2,"changeY":2,"changeZ":2},"$type":"NodeCanvas.Tasks.Actions.ChangeCameraSettings"},"_position":{"x":880.8403,"y":568.1857},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"5"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"_position":{"x":734.5245,"y":285.5939},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"_condition":{"actionName":{"_value":"Grapple"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_position":{"x":360.9515,"y":494.918},"$type":"NodeCanvas.BehaviourTrees.WaitUntil","$id":"1"},{"_action":{"fieldOfView":{"label":"FOV","value":60.0,"changeValue":1},"orbitPositionDamping":{"label":"Position
Damping","newValue":{"x":0.2,"z":0.2},"changeX":1,"changeZ":1},"orbitFollowTop":{"label":"Top","changeHeight":1,"height":2.0,"changeRadius":1,"radius":2.0},"orbitFollowCenter":{"label":"Center","changeHeight":1,"height":1.5,"changeRadius":1,"radius":2.4},"orbitFollowBottom":{"label":"Bottom","changeHeight":1,"height":0.2,"changeRadius":1,"radius":0.8},"cameraOffset":{"label":"Screen
Position","newValue":{"x":2.0,"y":0.5,"z":-1.0},"changeX":1,"changeY":1,"changeZ":1},"$type":"NodeCanvas.Tasks.Actions.ChangeCameraSettings"},"_position":{"x":184.6321,"y":659.3029},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"2"},{"policy":1,"_position":{"x":605.0,"y":499.0},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"3"},{"repeaterMode":2,"repeatTimes":{"_value":1},"_position":{"x":470.0,"y":657.0},"$type":"NodeCanvas.BehaviourTrees.Repeater","$id":"4"},{"_action":{"eventName":{"_value":"Grapple
Zoomed"},"delay":{},"$type":"NodeCanvas.Tasks.Actions.SendEvent"},"_position":{"x":438.0,"y":795.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"5"},{"_action":{"waitTime":{"_value":0.3},"$type":"NodeCanvas.Tasks.Actions.Wait"},"_position":{"x":647.4366,"y":655.895},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"6"},{"failureRemap":1,"_position":{"x":839.0,"y":510.0},"$type":"NodeCanvas.BehaviourTrees.Remapper","$id":"7"},{"_condition":{"actionName":{"_value":"Grapple"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_position":{"x":847.0,"y":582.0},"$type":"NodeCanvas.BehaviourTrees.Interruptor","$id":"8"},{"repeaterMode":2,"repeatTimes":{"_value":1},"_position":{"x":844.9237,"y":693.0772},"$type":"NodeCanvas.BehaviourTrees.Repeater","$id":"9"},{"_action":{"eventName":{"_value":"Grapple
Zoomed"},"delay":{},"$type":"NodeCanvas.Tasks.Actions.SendEvent"},"_position":{"x":808.9237,"y":848.0771},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"10"},{"_action":{"fieldOfView":{"label":"FOV","changeValue":2},"orbitFollowTop":{"label":"Top","changeHeight":2,"changeRadius":2},"orbitFollowCenter":{"label":"Center","changeHeight":2,"changeRadius":2},"orbitFollowBottom":{"label":"Bottom","changeHeight":2,"changeRadius":2},"screenPosition":{"label":"Screen
Position","changeX":2,"changeY":2},"cameraOffset":{"label":"Screen Position","changeX":2,"changeY":2,"changeZ":2},"$type":"NodeCanvas.Tasks.Actions.ChangeCameraSettings"},"_position":{"x":1043.84,"y":507.1857},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"11"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"8"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
_objectReferences: []
_graphSource:
_version: 3.31
_category:
_comments:
_translation: {x: -21.80302, y: 59.90968}
_translation: {x: 190, y: 18}
_zoomFactor: 1
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
_serializedGraph: '{"type":"NodeCanvas.StateMachines.FSM","nodes":[{"_actionList":{"executionMode":1,"actions":[{"moveSpeed":{"_value":12.0},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":10.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"facingDirection","_targetVariableID":"c713d622-aafb-43e7-ae0e-ac0b86a85a37"},"valueB":{"_value":1},"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[Reset.Player.Movement.PlayerFacingDirection,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":559.9924,"y":711.7622},"$type":"NodeCanvas.StateMachines.ActionState","$id":"0"},{"_actionList":{"executionMode":1,"actions":[{"moveSpeed":{"_value":30.0},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"facingDirection","_targetVariableID":"c713d622-aafb-43e7-ae0e-ac0b86a85a37"},"valueB":{"_value":2},"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[Reset.Player.Movement.PlayerFacingDirection,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":916.0607,"y":852.7302},"$type":"NodeCanvas.StateMachines.ActionState","$id":"1"},{"_actionList":{"executionMode":1,"actions":[{"moveSpeed":{"_value":20.0},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":2.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1161.288,"y":522.152},"$type":"NodeCanvas.StateMachines.ActionState","$id":"2"},{"_position":{"x":430.6569,"y":381.1322},"$type":"NodeCanvas.StateMachines.AnyState","$id":"3"},{"_position":{"x":465.0,"y":561.0},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"4"}],"connections":[{"_condition":{"actionName":{"_value":"Sprint"},"actionValue":{"_value":""},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"timeout":{"_value":0.1},"$type":"NodeCanvas.Tasks.Conditions.Timeout"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"checkAgainst":2,"checkAgainstValue":{"_value":{"z":1.0}},"desiredValue":{"_value":1.0},"tolerance":{"_value":0.32},"negate":{},"$type":"NodeCanvas.Tasks.Conditions.GetMovementInputDotProduct"},"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"321e55c7-f93e-4667-a0dc-559eb61c6898","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":916.0607,"y":852.7302},"$type":"NodeCanvas.StateMachines.ActionState","$id":"1"},{"_actionList":{"executionMode":1,"actions":[{"moveSpeed":{"_value":20.0},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":2.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1161.288,"y":522.152},"$type":"NodeCanvas.StateMachines.ActionState","$id":"2"},{"_position":{"x":430.6569,"y":381.1322},"$type":"NodeCanvas.StateMachines.AnyState","$id":"3"},{"_position":{"x":465.0,"y":561.0},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"4"}],"connections":[{"_condition":{"actionName":{"_value":"Sprint"},"actionValue":{"_value":""},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"timeout":{"_value":0.1},"$type":"NodeCanvas.Tasks.Conditions.Timeout"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"checkAgainst":2,"checkAgainstValue":{"_value":{"z":1.0}},"desiredValue":{"_value":1.0},"tolerance":{"_value":0.32},"considerCameraRotation":{},"negate":{},"$type":"NodeCanvas.Tasks.Conditions.GetMovementInputDotProduct"},"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"321e55c7-f93e-4667-a0dc-559eb61c6898","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"groundMoveDirection":{"_name":"groundMoveDirection","_id":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_isPublic":true,"$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"rotationSpeed":{"_name":"rotationSpeed","_id":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_isPublic":true,"$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"facingDirection":{"_name":"facingDirection","_id":"c713d622-aafb-43e7-ae0e-ac0b86a85a37","_isPublic":true,"$type":"NodeCanvas.Framework.Variable`1[[Reset.Player.Movement.PlayerFacingDirection,
@@ -24,7 +24,7 @@ MonoBehaviour:
_version: 3.31
_category:
_comments:
_translation: {x: -106, y: -44}
_translation: {x: -108, y: -44}
_zoomFactor: 1
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@@ -9,6 +9,11 @@ namespace NodeCanvas.Tasks.Conditions {
public BBParameter<string> observerLabel;
public BBParameter<RaycastHit> outputHitTo;
protected override string info{
get {
return $"Check Environment Observer, [\"{observerLabel.value}\"]";
}
}
//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

View File

@@ -6,6 +6,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using NodeCanvas.Editor;
using UnityEditor;
namespace Reset {
[Category("Reset")]
@@ -19,15 +21,44 @@ namespace Reset {
public BBParameter<Vector3> offset;
public BBParameter<LayerMask> ignoreLayers;
[ShowIf("castType", ((int)EnvironmentObserver.CastType.SphereCast|(int)EnvironmentObserver.CastType.SphereOverlap))]
public BBParameter<float> width;
public BBParameter<Vector3> size;
public BBParameter<Vector3> rotation;
public bool drawGizmos;
public bool drawGizmosOnlyWhenActive;
private EnvironmentObserver observer;
protected override void OnTaskInspectorGUI(){
BBParameterEditor.ParameterField("Cast Type", castType);
BBParameterEditor.ParameterField("Length", length);
BBParameterEditor.ParameterField("Direction", direction);
BBParameterEditor.ParameterField("Offset", offset);
BBParameterEditor.ParameterField("Ignore Layers", ignoreLayers);
if (castType.value == EnvironmentObserver.CastType.SphereCast || castType.value == EnvironmentObserver.CastType.SphereOverlap) {
BBParameterEditor.ParameterField("Width", width);
}
if (castType.value == EnvironmentObserver.CastType.BoxCast || castType.value == EnvironmentObserver.CastType.BoxOverlap) {
BBParameterEditor.ParameterField("Size", size);
}
if (castType.value != EnvironmentObserver.CastType.Ray) {
BBParameterEditor.ParameterField("Rotation", rotation);
}
drawGizmos = EditorGUILayout.Toggle("Draw Gizmos", drawGizmos);
if (drawGizmos) {
drawGizmosOnlyWhenActive = EditorGUILayout.Toggle("Draw Gizmos Only When Active", drawGizmosOnlyWhenActive);
}
}
//Return null if init was successfull. Return an error string otherwise
protected override string OnInit(){
return null;
@@ -36,11 +67,13 @@ namespace Reset {
//Called whenever the condition gets enabled.
protected override void OnEnable() {
observer = new EnvironmentObserver(){
castType = EnvironmentObserver.CastType.SphereCast,
castType = castType.value,
active = true,
length = length.value,
direction = direction.value,
offset = offset.value,
ignoreLayers = ignoreLayers.value,
width = width.value,
@@ -57,7 +90,13 @@ namespace Reset {
//Called once per frame while the condition is active.
//Return whether the condition is success or failure.
protected override bool OnCheck() {
return observer.Evaluate(agent.gameObject);
bool check = observer.Evaluate(agent.gameObject);
if (drawGizmos) {
observer.DrawObserverGizmo(agent.gameObject, true);
}
return check;
}
}
}

View File

@@ -133,10 +133,11 @@ public class EnvironmentObserver{
return false;
}
public void DrawObserverGizmo(GameObject source){
if (gizmoDrawingCondition == ObserverGizmoDrawingCondition.Never ||
(gizmoDrawingCondition == ObserverGizmoDrawingCondition.OnlyActive ! & active)) {
return;
public void DrawObserverGizmo(GameObject source, bool drawAnyways = false){
if (!drawAnyways){
if (gizmoDrawingCondition == ObserverGizmoDrawingCondition.Never || (gizmoDrawingCondition == ObserverGizmoDrawingCondition.OnlyActive ! & active)) {
return;
}
}
Vector3 relativeStart = source.transform.position + offset;