blob: f6db8af5d13b78a1352b71bbcfc4d4e89305c535 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef WORLDPARTICLECOLLIDER_H
#define WORLDPARTICLECOLLIDER_H
#include "Runtime/BaseClasses/GameObject.h"
#include "ParticleStruct.h"
class WorldParticleCollider : public Unity::Component
{
public:
REGISTER_DERIVED_CLASS (WorldParticleCollider, Unity::Component)
DECLARE_OBJECT_SERIALIZE (WorldParticleCollider)
WorldParticleCollider (MemLabelId label, ObjectCreationMode mode);
virtual void Reset ();
void UpdateParticleCollider( ParticleArray& particles, PrivateParticleInfo& privateInfo, float deltaTime );
private:
/// The velocity at which a particle is killed after the bounced velocity is calculated
float m_MinKillVelocity;
float m_BounceFactor;
/// Seconds of energy a particle loses when colliding
float m_CollisionEnergyLoss;
/// Collides the particles with every collider whose layerMask & m_CollidesWith != 0
BitField m_CollidesWith;
/// Should we send out a collision message for every particle that has collided?
bool m_SendCollisionMessage;
};
#endif
|