-
Notifications
You must be signed in to change notification settings - Fork 1
Self vs Other
Blends, Collision Effects, Particle Overrides, and Particle Sets all have control over a multiplier struct called ParticleMultipliers
float countMultiplier
float sizeMultiplier
However they are separated into 2 fields:
ParticleMultipliers selfParticleMultipliers
ParticleMultipliers otherParticleMultipliers
No matter where you find these fields, they all mean the same thing:
- "Self" -> The colliding object
- "Other" -> the object being collided against
The difference between which is which is: Self is the object that is sampling the surface types of the other object.
- Collision Effects:
- If A has a CollisionEffects component and B doesn't, then A is "self"
- If both have CollisionEffects, then:
- If A has a higher priority, then A is "self"; if B has a higher priority, then B is "self"
- If they have the same priority, then it is "random" whether A or B will be "self" within a frame.
- Footsteps
- The object creating footsteps is "self"
- GunShooter
- GunShooter is "self"
The object "other" needs to be able to be tested for what SurfaceType it represents, which means it needs a Marker or a valid Material name.
The reason you need to remember that "self" means the object that is testing for SurfaceTypes, is because you have the 2 multiplier fields in the markers, and intuitively "self" seems like it should represent the object the component is attached to, but it is not. "Other" is always the object being queried. "Self" is the object querying.