Hey !
I’m trying to use the Ray POP to simulate surface bouncing. The thing is that when a point hits the surface, RayReflect instantly gets the RayAttribute value, v attribute in my case. So I tried to use a cache on RayReflect, it behaves good for a few bounces and then all the points get the v attribute value. How can I fix this ?
RayPOP.toe (8.2 KB)
Thank you
Hello,
Planning on taking a look at your toe soon, in the mean time, there is a Basic Collisions example using the Ray POP at the bottom of Particles/ParticleBasics in Overview.toe which sounds related to what you’re trying to achieve and might be helpful.
Vincent
so looking a bit more into this, the bit you’re missing is checking the distance to the surface otherwise the velocity updates into the reflected velocity every frame.
This is what the setup in Particles/ParticleBasics is doing. “Close” is 1 when the particle is close and then the mix operation switches the velocity for the reflected velocity.
If you limit the max speed of the particles, instead of 0.05 you could check more precisely when the particles collide with the surface
Let me know if that makes sense!
1 Like
Hey Vincent,
Thank you for your answer. Indeed I took a look at the Overview.toe and it does almost what I want to create. I noticed that some particles go through the 3 spheres surfaces. Is there a way to create something very robust so we get only collisions ?
It makes sense, thank you for this ! I will try to improve my project ! 
Have a beautiful day,
Edgar