Particle system on press

Is there a code to make a particle system play when pressed then reset

Hi @Gavin_Durbin! I don’t know how you want to use it exactly, but I think you can use something like te script below. For this script your entity with the particle system need also a rigidbody and collision component.

var PickerRaycast = pc.createScript('pickerRaycast');

// initialize code called once per entity
PickerRaycast.prototype.initialize = function() {, this.onSelect, this);

PickerRaycast.prototype.onSelect = function (e) {
    var cam ='Camera');
    var from =, e.y,;
    var to =, e.y,;

    var result =, to);
    if (result && result.entity.particlesystem) {