Hello. I want to teleport particles. When particles hit a certain collider, I want to move the particles to another position, but with them retaining their velocity. How can I do this? Thanks
When dealing with particle collision you need to attach a “World Particle collider” to your particle system. You will also need to use a OnParticleCollision function. You will use the OnParticleCollision function to detect when your particle system hits a collider with a certain tag or name. When the particle hits the defined collider you change the position using transform.position
Just attach a script that says something like this:
if(transform.position.x > 50) {
transform.position = new Vector3(insert your position here);
}
Just replace x with the variable that you want. This is the method for reaching a certain distance though. But if you want the collision you have to use:
public void OnParticleCollision(GameObject other) {
if(other.tag == "The Gameobject Your Colliding With") {
transform.position = new Vector3(your new position);
}
}