I have a lightning particle that gets shot at the ground. I want the particles to collide with the object they hit and add an upward force. I tried just entering a negative force in the Collider Force tab but it defaults to 0. If anyone knows a way to do this it would be greatly appreciated!
and this is the code I used to get it moving:
void OnParticleCollision(GameObject other)
if(other.GetComponent<Rigidbody>() != null)
other.GetComponent<Rigidbody>().AddForce(transform.up * 160);
I hope that what you are trying to achieve is to make the particles bounce back from a surface. I do not think we need collider force for that. Just set bounce value to non zero. That should work.
If you want the particle rebound to go upward only, use the trigger section just like you would use BoxCollider2D. Use another particle system to send particle upwards.
rebound and upward
I would guess you have to write a script for particle system to fire whenever a collision is detected on the plane. The second alternative sounds cleaner. Just cover up the ground with a lot of light, nobody will notice :)
Particle system has a list of collision events. This script checks collisions and matches tags. If tags match, then action is executed. Uncomment flag= true if you want only one collisions.