VR Interaction Framework v2.0
Loading...
Searching...
No Matches
BNG.DamageCollider Class Reference

This collider will Damage a Damageable object on impact. More...

Inheritance diagram for BNG.DamageCollider:

Public Member Functions

virtual void OnCollisionEvent (Collision collision)
 

Public Attributes

float Damage = 25f
 How much damage to apply to the Damageable object.
 
Rigidbody ColliderRigidbody
 Used to determine velocity of this collider.
 
float MinForce = 0.1f
 Minimum Amount of force necessary to do damage. Expressed as relativeVelocity.magnitude.
 
float LastRelativeVelocity = 0
 Our previous frame's last relative velocity value.
 
float LastDamageForce = 0
 
bool TakeCollisionDamage = false
 Should this take damage if this collider collides with something? For example, pushing a box off of a ledge and it hits the ground.
 
float CollisionDamage = 5
 How much damage to apply if colliding with something at speed.
 

Detailed Description

This collider will Damage a Damageable object on impact.

Member Function Documentation

◆ OnCollisionEvent()

virtual void BNG.DamageCollider.OnCollisionEvent ( Collision  collision)
virtual

Member Data Documentation

◆ ColliderRigidbody

Rigidbody BNG.DamageCollider.ColliderRigidbody

Used to determine velocity of this collider.

◆ CollisionDamage

float BNG.DamageCollider.CollisionDamage = 5

How much damage to apply if colliding with something at speed.

◆ Damage

float BNG.DamageCollider.Damage = 25f

How much damage to apply to the Damageable object.

◆ LastDamageForce

float BNG.DamageCollider.LastDamageForce = 0

◆ LastRelativeVelocity

float BNG.DamageCollider.LastRelativeVelocity = 0

Our previous frame's last relative velocity value.

◆ MinForce

float BNG.DamageCollider.MinForce = 0.1f

Minimum Amount of force necessary to do damage. Expressed as relativeVelocity.magnitude.

◆ TakeCollisionDamage

bool BNG.DamageCollider.TakeCollisionDamage = false

Should this take damage if this collider collides with something? For example, pushing a box off of a ledge and it hits the ground.


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