IVfxShape
Inheritance 6 descendants
Class Documentation
Edit documentationA spawn shape: the object in the SpawnShape of an
emitter that places each new particle relative to
the birth position. A shape returns an offset in the emitter's local frame and can turn
the particle's birth velocity and birth acceleration.
When a shape is sampled
Complex and simple emitters both apply the shape, once for every particle at birth. For each particle the emitter:
- Computes the birth velocity and birth acceleration.
- Takes the offset from the shape.
- Applies
offsetLifetimeScalingto the particle's lifetime with this raw offset. - Multiplies the offset by the offset factors of
FlexShapeDefinitionand by the system scale. - Adds the emission mesh or emission surface point to the base position. When
useEmissionMeshNormalForBirthis set, it points the velocity and acceleration along the surface normal. - Lets the shape turn the offset, the velocity and the acceleration by one rotation.
- Sets the birth position to the base position plus the offset.
A VfxShapeLegacy also evaluates its curves once per spawn step, before the particles of the step are made. The other shapes have no curves.
Rotation of velocity and acceleration
The shape returns no normal. Its only effect on motion is the rotation in step 6: the rotation that places the offset also turns the birth velocity and birth acceleration. A velocity authored along the direction in which the shape seeds its offset therefore leaves the shape outward.
| Shape | Rotation | Effect on the birth velocity |
|---|---|---|
| VfxShapeSphere | Random turns about Y, then Z | A velocity along +X points away from the centre. |
| VfxShapeCylinder | A random turn about Y | A velocity along +X points away from the Y axis. |
| VfxShapeBox | Random quarter turns, or none in interior mode | A velocity along +Z becomes the normal of the chosen face. In interior mode the velocity is unchanged. |
| VfxShapeLegacy | The authored turns | The velocity turns with the offset. |
| VfxShapePointDoNotUse | None | The velocity is unchanged. |
The shape does not set the particle's orientation. A direction-oriented particle
(isDirectionOriented) follows the turn only through its velocity.
Referenced by 2 classes · 2 properties
- VfxEmitterDefinitionData SpawnShape
Pointer<IVfxShape> - VfxLegacyPhysicsComponent SpawnShape
Pointer<IVfxShape>