Add this component to a projectile (in 3D) and it'll be able to push stuff (opening doors for example)
More...
|
| float | PushPower = 10f |
| | the amount of force to apply when colliding
|
| 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
|
|
| virtual void | Awake () |
| | On Awake we grab our projectile component.
|
| virtual void | OnTriggerEnter (Collider collider) |
| | When our projectile collides with something, if it has a rigidbody, we apply the specified force to it.
|
Add this component to a projectile (in 3D) and it'll be able to push stuff (opening doors for example)
◆ 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
-
◆ _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:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/Weapons/PusherProjectile3D.cs