diff options
author | chai <chaifix@163.com> | 2022-03-10 14:07:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-03-10 14:07:40 +0800 |
commit | 22891bf59032ba88262824255a706d652031384b (patch) | |
tree | 7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics')
6 files changed, 0 insertions, 198 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs deleted file mode 100644 index fb82128e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs +++ /dev/null @@ -1,29 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityPhysics
-{
- [TaskCategory("Basic/Physics")]
- [TaskDescription("Returns success if there is any collider intersecting the line between start and end")]
- [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=117")]
- public class Linecast : Action
- {
- [Tooltip("The starting position of the linecast")]
- SharedVector3 startPosition;
- [Tooltip("The ending position of the linecast")]
- SharedVector3 endPosition;
- [Tooltip("Selectively ignore colliders.")]
- public LayerMask layerMask = -1;
-
- public override TaskStatus OnUpdate()
- {
- return Physics.Linecast(startPosition.Value, endPosition.Value, layerMask) ? TaskStatus.Success : TaskStatus.Failure;
- }
-
- public override void OnReset()
- {
- startPosition = Vector3.zero;
- endPosition = Vector3.zero;
- layerMask = -1;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs.meta deleted file mode 100644 index c380726f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Linecast.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 163f5567b8906cd45adf138c3c022152
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs deleted file mode 100644 index d79c9ae9..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs +++ /dev/null @@ -1,71 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityPhysics
-{
- [TaskCategory("Basic/Physics")]
- [TaskDescription("Casts a ray against all colliders in the scene. Returns success if a collider was hit.")]
- [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=117")]
- public class Raycast : Action
- {
- [Tooltip("Starts the ray at the GameObject's position. If null the originPosition will be used")]
- public SharedGameObject originGameObject;
- [Tooltip("Starts the ray at the position. Only used if originGameObject is null")]
- public SharedVector3 originPosition;
- [Tooltip("The direction of the ray")]
- public SharedVector3 direction;
- [Tooltip("The length of the ray. Set to -1 for infinity")]
- public SharedFloat distance = -1;
- [Tooltip("Selectively ignore colliders")]
- public LayerMask layerMask = -1;
- [Tooltip("Cast the ray in world or local space. The direction is in world space if no GameObject is specified")]
- public Space space = Space.Self;
-
- [SharedRequired]
- [Tooltip("Stores the hit object of the raycast")]
- public SharedGameObject storeHitObject;
- [SharedRequired]
- [Tooltip("Stores the hit point of the raycast")]
- public SharedVector3 storeHitPoint;
- [SharedRequired]
- [Tooltip("Stores the hit normal of the raycast")]
- public SharedVector3 storeHitNormal;
- [SharedRequired]
- [Tooltip("Stores the hit distance of the raycast")]
- public SharedFloat storeHitDistance;
-
- public override TaskStatus OnUpdate()
- {
- Vector3 position;
- Vector3 dir = direction.Value;
- if (originGameObject.Value != null) {
- position = originGameObject.Value.transform.position;
- if (space == Space.Self) {
- dir = originGameObject.Value.transform.TransformDirection(direction.Value);
- }
- } else {
- position = originPosition.Value;
- }
-
- RaycastHit hit;
- if (Physics.Raycast(position, dir, out hit, distance.Value == -1 ? Mathf.Infinity : distance.Value, layerMask)) {
- storeHitObject.Value = hit.collider.gameObject;
- storeHitPoint.Value = hit.point;
- storeHitNormal.Value = hit.normal;
- storeHitDistance.Value = hit.distance;
- return TaskStatus.Success;
- }
-
- return TaskStatus.Failure;
- }
-
- public override void OnReset()
- {
- originGameObject = null;
- originPosition = Vector3.zero;
- direction = Vector3.zero;
- distance = -1;
- layerMask = -1;
- space = Space.Self;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs.meta deleted file mode 100644 index b5f5d6d9..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Raycast.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: afcf9d39edef45146ad7a043b8bfa76e
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs deleted file mode 100644 index da1c646e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs +++ /dev/null @@ -1,74 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityPhysics
-{
- [TaskCategory("Basic/Physics")]
- [TaskDescription("Casts a sphere against all colliders in the scene. Returns success if a collider was hit.")]
- [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=117")]
- public class SphereCast : Action
- {
- [Tooltip("Starts the spherecast at the GameObject's position. If null the originPosition will be used")]
- public SharedGameObject originGameObject;
- [Tooltip("Starts the sherecast at the position. Only used if originGameObject is null")]
- public SharedVector3 originPosition;
- [Tooltip("The radius of the spherecast")]
- public SharedFloat radius;
- [Tooltip("The direction of the spherecast")]
- public SharedVector3 direction;
- [Tooltip("The length of the spherecast. Set to -1 for infinity")]
- public SharedFloat distance = -1;
- [Tooltip("Selectively ignore colliders")]
- public LayerMask layerMask = -1;
- [Tooltip("Use world or local space. The direction is in world space if no GameObject is specified")]
- public Space space = Space.Self;
-
- [SharedRequired]
- [Tooltip("Stores the hit object of the spherecast")]
- public SharedGameObject storeHitObject;
- [SharedRequired]
- [Tooltip("Stores the hit point of the spherecast")]
- public SharedVector3 storeHitPoint;
- [SharedRequired]
- [Tooltip("Stores the hit normal of the spherecast")]
- public SharedVector3 storeHitNormal;
- [SharedRequired]
- [Tooltip("Stores the hit distance of the spherecast")]
- public SharedFloat storeHitDistance;
-
- public override TaskStatus OnUpdate()
- {
- Vector3 position;
- Vector3 dir = direction.Value;
- if (originGameObject.Value != null) {
- position = originGameObject.Value.transform.position;
- if (space == Space.Self) {
- dir = originGameObject.Value.transform.TransformDirection(direction.Value);
- }
- } else {
- position = originPosition.Value;
- }
-
- RaycastHit hit;
- if (Physics.SphereCast(position, radius.Value, dir, out hit, distance.Value == -1 ? Mathf.Infinity : distance.Value, layerMask)) {
- storeHitObject.Value = hit.collider.gameObject;
- storeHitPoint.Value = hit.point;
- storeHitNormal.Value = hit.normal;
- storeHitDistance.Value = hit.distance;
- return TaskStatus.Success;
- }
-
- return TaskStatus.Failure;
- }
-
- public override void OnReset()
- {
- originGameObject = null;
- originPosition = Vector3.zero;
- radius = 0;
- direction = Vector3.zero;
- distance = -1;
- layerMask = -1;
- space = Space.Self;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs.meta deleted file mode 100644 index 24ed1701..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Physics/Spherecast.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 2058f3f94c5bdf5409f9ff80ea61d44a
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
|