TopDown Engine  v3.6
MoreMountains.TopDownEngine.PusherProjectile3D Class Reference

Add this component to a projectile (in 3D) and it'll be able to push stuff (opening doors for example) More...

Inheritance diagram for MoreMountains.TopDownEngine.PusherProjectile3D:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Attributes

float PushPower = 10f
 the amount of force to apply when colliding More...
 
float PositionOffset = 0f
 an offset to apply on the projectile's forward to account for super high speeds. This will affect the position the force is applied at. Usually 0 will be fine More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we grab our projectile component More...
 
virtual void OnTriggerEnter (Collider collider)
 When our projectile collides with something, if it has a rigidbody, we apply the specified force to it More...
 

Protected Attributes

Rigidbody _pushedRigidbody
 
Projectile _projectile
 
Vector3 _pushDirection
 

Detailed Description

Add this component to a projectile (in 3D) and it'll be able to push stuff (opening doors for example)

Member Function Documentation

◆ Awake()

virtual void MoreMountains.TopDownEngine.PusherProjectile3D.Awake ( )
protectedvirtual

On Awake we grab our projectile component

◆ OnTriggerEnter()

virtual void MoreMountains.TopDownEngine.PusherProjectile3D.OnTriggerEnter ( Collider  collider)
protectedvirtual

When our projectile collides with something, if it has a rigidbody, we apply the specified force to it

Parameters
collider

Member Data Documentation

◆ _projectile

Projectile MoreMountains.TopDownEngine.PusherProjectile3D._projectile
protected

◆ _pushDirection

Vector3 MoreMountains.TopDownEngine.PusherProjectile3D._pushDirection
protected

◆ _pushedRigidbody

Rigidbody MoreMountains.TopDownEngine.PusherProjectile3D._pushedRigidbody
protected

◆ PositionOffset

float MoreMountains.TopDownEngine.PusherProjectile3D.PositionOffset = 0f

an offset to apply on the projectile's forward to account for super high speeds. This will affect the position the force is applied at. Usually 0 will be fine

◆ PushPower

float MoreMountains.TopDownEngine.PusherProjectile3D.PushPower = 10f

the amount of force to apply when colliding


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