Class UpdaterCollider
The UpdaterCollider is an updater which tests the particles against a preset surface or shape, making them bounce off it when they collide
[DataContract("UpdaterCollider")]
[Display("Collider", null)]
public class UpdaterCollider : ParticleUpdater
- Inheritance
-
UpdaterCollider
- Inherited Members
Constructors
UpdaterCollider()
Default constructor which also registers the fields required by this updater
public UpdaterCollider()
Properties
DebugDraw
Should this Particle Module's bounds be displayed as a debug draw
[DataMember(-1)]
public bool DebugDraw { get; set; }
Property Value
FieldShape
The type of the shape which defines this collider
[DataMember(10)]
[Display("Shape", null)]
public FieldShape FieldShape { get; set; }
Property Value
Friction
How much of the horizontal (normal-perpendicular) kinetic energy is lost after impact
[DataMember(90)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
[Display("Friction", null)]
public float Friction { get; set; }
Property Value
IsHollow
Shows if the collider shape is hollow on the inside or solid
[DataMember(50)]
[Display("Is hollow", null)]
public bool IsHollow { get; set; }
Property Value
IsPostUpdater
All updaters are called exactly once during each ParticleEmitter's update. Most updaters are called before spawning the new particles for the frame, but post updaters are called after that.
public override bool IsPostUpdater { get; }
Property Value
KillParticles
Kill particles when they collide with the shape
[DataMember(60)]
[Display("Kill particles", null)]
public bool KillParticles { get; set; }
Property Value
Restitution
How much of the vertical (normal-oriented) kinetic energy is preserved after impact
[DataMember(70)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
[Display("Restitution", null)]
public float Restitution { get; set; }
Property Value
Methods
TryGetDebugDrawShape(out DebugDrawShape, out Vector3, out Quaternion, out Vector3)
Attepmts to get a debug shape (shape type and location matrix) for the current module in order to display its boundaries better
public override bool TryGetDebugDrawShape(out DebugDrawShape debugDrawShape, out Vector3 translation, out Quaternion rotation, out Vector3 scale)
Parameters
debugDrawShape
DebugDrawShapeType of the debug draw shape
translation
Vector3Translation of the shape
rotation
QuaternionRotation of the shape
scale
Vector3Scaling of the shape
Returns
Update(float, ParticlePool)
Updates all particles in the ParticlePool using this updater
public override void Update(float dt, ParticlePool pool)
Parameters
dt
floatDelta time in seconds which has passed since the last update call
pool
ParticlePoolThe target ParticlePool which needs to be updated