Energy Based Objects  2.01
Public Member Functions | Public Attributes
ObjectPusher Class Reference

Pushes Rigidbodies and Bullets. More...

Inheritance diagram for ObjectPusher:
ObjectShootingPoint ObjectSpawnerPusher

List of all members.

Public Member Functions

void Push ()
 Adds force to the projectiles that have a Rigidbody or Bullet component.
void ClearProjectiles ()
 Resets the pushProjectiles array.

Public Attributes

GameObject[] pushProjectiles
 These can be set manually from another script or from the inspector.
Vector3 force = Vector3.forward
 The amount of force used to push the projectiles in the direction of this object (Force direction is local to this object)
Vector3 randomForce
 Random force applied to force (Random force is local to this object)
ForceMode forceMode = ForceMode.Acceleration
 The force mode that will be used to push the projectiles.
bool multiplyDeltaTime
 Multiplies the force by Time.deltaTime. Use this if you are using the force modes Force and Acceleration.
bool useForceCurve
 Use the forceCurve to decide how much power should be applied at certain distances.
AnimationCurve forceCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 1))
 X = Distance, Y = Power Multiplier.
bool pushAtWorldPoint
 Use AddForceAtPosition using worldPushPoint as the position to push.
Vector3 worldPushPoint
 Push rigidbodies at this position with AddForceAtPosition.
bool useExplosionForce
 Use Rigidbody.AddExplosionForce. This setting does not effect the Bullet component.
bool implosion
 Reverse the explosion force.
float explosionRadius = Mathf.Infinity
 The radius of the explosion.
bool notKinematicOnShoot
 isKinematic is turned off on projectiles when this weapon is shot
bool unparentOnShoot
 Unparent the projectiles when this weapon is shot.

Detailed Description

Pushes Rigidbodies and Bullets.


Member Function Documentation

void ClearProjectiles ( )

Resets the pushProjectiles array.

void Push ( )

Adds force to the projectiles that have a Rigidbody or Bullet component.


Member Data Documentation

float explosionRadius = Mathf.Infinity

The radius of the explosion.

Vector3 force = Vector3.forward

The amount of force used to push the projectiles in the direction of this object (Force direction is local to this object)

AnimationCurve forceCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 1))

X = Distance, Y = Power Multiplier.

ForceMode forceMode = ForceMode.Acceleration

The force mode that will be used to push the projectiles.

bool implosion

Reverse the explosion force.

Multiplies the force by Time.deltaTime. Use this if you are using the force modes Force and Acceleration.

isKinematic is turned off on projectiles when this weapon is shot

Use AddForceAtPosition using worldPushPoint as the position to push.

GameObject [] pushProjectiles

These can be set manually from another script or from the inspector.

Vector3 randomForce

Random force applied to force (Random force is local to this object)

Unparent the projectiles when this weapon is shot.

Use Rigidbody.AddExplosionForce. This setting does not effect the Bullet component.

Use the forceCurve to decide how much power should be applied at certain distances.

Vector3 worldPushPoint

Push rigidbodies at this position with AddForceAtPosition.

 All Classes Namespaces Functions Variables Properties Events