User Guide (Version 1.17)

Particle Entity-Specific Functions


Sets particle entity parameters.

During movement, particles trace rays along their paths with the length size*0.5 (since size stands for 'diameter' rather than 'radius') to check if they hit something. When they lie or slide, they position themselves at a distance of thickness*0.5 from the surface (thus thin objects like shards of glass can be simulated).

Particles can be set to have additional acceleration due to thrust of a lifting force (assuming that they have wings) with the parameters accThrust and accLift but these should never be used without specifying kAirResistance; otherwise, particles gain infinite velocity.

Particles can optionally spin when in the air (toggled with flag particle_no_spin). Spinning is independent from linear motion of particles and is changed only after impacts or falling from surfaces.

Particles can align themselves with the direction of the movement (toggled with particle_no_path_alignment flag) which is very useful for objects like rockets. That way, the y-axis of the entity is aligned with the heading and the z-axis is set to be orthogonal to y and to point upward ('up' direction is considered to be opposite to particle's gravity).

When moving along a surface, particles can either slide or roll. Rolling can be disabled with the flag particle_no_roll (it is automatically disabled on steep slopes). Note that rolling uses the particle material's friction as damping while rolling treats friction in a conventional way. When touching ground, particles align themselves so that their normal (defined in entity frame) is parallel to the surface normal.

Particles can always keep the initial orientation as well (particle_constant_orientation) and stop completely after the first contact (particle_single_contact). minBounceVel specifies the lower velocity threshold after which the particle will not bounce, even if the bounciness of the contact is more than 0.

On this page: