class MAGES::Experimental::SceneGraph::ImpactBehavior¶
Overview¶
The behavior for the Impact Action. More…
class ImpactBehavior: public MAGES::SceneGraph::BaseBehavior { public: // properties int Hits; float TargetMagnitude; UnityEvent OnRegisteredHitEvent; float MagnitudeLowIgnoreThreshold; float MagnitudeHighIgnoreThreshold; Vector3 ImpactDirection; float ImpactDirectionThreshold; bool ContainsAnimation; string AnimatorStateName; string AnimatorLayerName; float CumulativeImpactMagnitude; bool IsImpactActive; UnityEvent OnImpacted; // methods void AddImpactMagnitude(float impactMagnitude, Vector3 impactDirectionVector); };
Inherited Members¶
public:
// properties
string ObjectID;
BaseActionData ActionData;
Detailed Documentation¶
The behavior for the Impact Action.
Properties¶
int Hits
Gets or sets the amount of impact hits required for the action to be performed.
float TargetMagnitude
Gets or sets the magnitude that has to be reached for the action to be performed.
UnityEvent OnRegisteredHitEvent
Gets the on triggered event.
float MagnitudeLowIgnoreThreshold
Gets or sets the lower boundary of detected magnitude.
float MagnitudeHighIgnoreThreshold
Gets or sets the upper boundary of detected magnitude.
Vector3 ImpactDirection
Gets or sets the lower boundary of detected magnitude.
float ImpactDirectionThreshold
Gets or sets the upper boundary of detected magnitude.
bool ContainsAnimation
Gets or sets a value indicating whether the Impact Action includes animation.
string AnimatorStateName
Gets or sets the animator state name.
string AnimatorLayerName
Gets or sets the animator layer name.
float CumulativeImpactMagnitude
Gets or sets the cumulative magnitude detected on the impact object.
bool IsImpactActive
Gets or sets a value indicating whether an impact was detected.
UnityEvent OnImpacted
Gets the event.
Methods¶
void AddImpactMagnitude(float impactMagnitude, Vector3 impactDirectionVector)
Adds the magnitude to the cumulative magnitude and checks whether the target magnitude is reached.
Parameters:
impactMagnitude |
The detected impact magnitude. |
impactDirectionVector |
The detected impact direction. |