Infinite Runner Engine v1.9
Public Types | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMF_Rigidbody2D Class Reference

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

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

Public Types

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

Public Attributes

Rigidbody2D TargetRigidbody2D
 the rigidbody to target on play More...
 
Modes Mode = Modes.AddForce
 the selected mode for this feedback More...
 
Vector2 MinForce
 the min force or torque to apply More...
 
Vector2 MaxForce
 the max force or torque to apply More...
 
float MinTorque
 the min torque to apply to this rigidbody on play More...
 
float MaxTorque
 the max torque to apply to this rigidbody on play More...
 
ForceMode2D AppliedForceMode = ForceMode2D.Impulse
 the force mode to apply 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 CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Custom Play, we apply our force or torque to the target rigidbody More...
 

Protected Attributes

Vector2 _force
 
float _torque
 

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 

Member Function Documentation

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_Rigidbody2D.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

Vector2 MoreMountains.Feedbacks.MMF_Rigidbody2D._force
protected

◆ _torque

float MoreMountains.Feedbacks.MMF_Rigidbody2D._torque
protected

◆ AppliedForceMode

ForceMode2D MoreMountains.Feedbacks.MMF_Rigidbody2D.AppliedForceMode = ForceMode2D.Impulse

the force mode to apply

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Rigidbody2D.FeedbackTypeAuthorized = true
static

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

◆ MaxForce

Vector2 MoreMountains.Feedbacks.MMF_Rigidbody2D.MaxForce

the max force or torque to apply

◆ MaxTorque

float MoreMountains.Feedbacks.MMF_Rigidbody2D.MaxTorque

the max torque to apply to this rigidbody on play

◆ MinForce

Vector2 MoreMountains.Feedbacks.MMF_Rigidbody2D.MinForce

the min force or torque to apply

◆ MinTorque

float MoreMountains.Feedbacks.MMF_Rigidbody2D.MinTorque

the min torque to apply to this rigidbody on play

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Rigidbody2D.Mode = Modes.AddForce

the selected mode for this feedback

◆ TargetRigidbody2D

Rigidbody2D MoreMountains.Feedbacks.MMF_Rigidbody2D.TargetRigidbody2D

the rigidbody to target on play


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