Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_Rigidbody Class Reference

this feedback will let you apply forces and torques (relative or not) to a Rigidbody More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_Rigidbody:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  Modes { Modes.AddForce, Modes.AddRelativeForce, Modes.AddTorque, Modes.AddRelativeTorque }
 sets the inspector color for this feedback More...
 

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 
Rigidbody TargetRigidbody
 the rigidbody to target on play More...
 
List< Rigidbody > ExtraTargetRigidbodies
 a list of extra rigidbodies to target on play More...
 
Modes Mode = Modes.AddForce
 the selected mode for this feedback More...
 
Vector3 MinForce
 the min force or torque to apply More...
 
Vector3 MaxForce
 the max force or torque to apply More...
 
ForceMode AppliedForceMode = ForceMode.Impulse
 the force mode to apply More...
 
bool ResetVelocityOnPlay = false
 if this is true, the velocity of the rigidbody will be reset before applying the new force More...
 
bool ForwardForce = false
 if this is true, the magnitude of the min/max force will be applied in the target transform's forward direction More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Custom Play, we apply our force or torque to the target rigidbody More...
 
virtual void ApplyForce (Rigidbody rb)
 Applies the computed force to the target rigidbody More...
 

Protected Attributes

Vector3 _force
 

Additional Inherited Members

Detailed Description

this feedback will let you apply forces and torques (relative or not) to a Rigidbody

Member Enumeration Documentation

◆ Modes

sets the inspector color for this feedback

Enumerator
AddForce 
AddRelativeForce 
AddTorque 
AddRelativeTorque 

Member Function Documentation

◆ ApplyForce()

virtual void MoreMountains.Feedbacks.MMF_Rigidbody.ApplyForce ( Rigidbody  rb)
protectedvirtual

Applies the computed force to the target rigidbody

Parameters
rb

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_Rigidbody.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_Rigidbody.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Custom Play, we apply our force or torque to the target rigidbody

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _force

Vector3 MoreMountains.Feedbacks.MMF_Rigidbody._force
protected

◆ AppliedForceMode

ForceMode MoreMountains.Feedbacks.MMF_Rigidbody.AppliedForceMode = ForceMode.Impulse

the force mode to apply

◆ ExtraTargetRigidbodies

List<Rigidbody> MoreMountains.Feedbacks.MMF_Rigidbody.ExtraTargetRigidbodies

a list of extra rigidbodies to target on play

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Rigidbody.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ ForwardForce

bool MoreMountains.Feedbacks.MMF_Rigidbody.ForwardForce = false

if this is true, the magnitude of the min/max force will be applied in the target transform's forward direction

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_Rigidbody.HasAutomatedTargetAcquisition => true

◆ MaxForce

Vector3 MoreMountains.Feedbacks.MMF_Rigidbody.MaxForce

the max force or torque to apply

◆ MinForce

Vector3 MoreMountains.Feedbacks.MMF_Rigidbody.MinForce

the min force or torque to apply

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Rigidbody.Mode = Modes.AddForce

the selected mode for this feedback

◆ ResetVelocityOnPlay

bool MoreMountains.Feedbacks.MMF_Rigidbody.ResetVelocityOnPlay = false

if this is true, the velocity of the rigidbody will be reset before applying the new force

◆ TargetRigidbody

Rigidbody MoreMountains.Feedbacks.MMF_Rigidbody.TargetRigidbody

the rigidbody to target on play


The documentation for this class was generated from the following file: