Aug
1
2013

Testing OnParticleCollision()

shuriken_particle_collision_event_water_paint_unity

Testing the new 4.2 feature, shuriken particle collision event:
http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnParticleCollision.html
Collision event returns info from particle: Collider, intersection, normal, velocity
http://docs.unity3d.com/Documentation/ScriptReference/ParticleSystem.CollisionEvent.html

Features:
– Tried to make the spray look like water..but that didnt work out yet..
– Particles hit the plane, and fire that OnParticleCollision event
– Paint on the hit position to add “water” on the stone texture (using extra raycast to hit position for now, not sure how to get texture position from world collision point..?)
– Press F to enable flow..(doesnt work nicely yet..)
– Original texture: http://www.cgtextures.com/texview.php?id=56233 (stone normal map was created with this normal map plugin)
– Water shader is modified from this water night scene

 

Webplayer:
http://unitycoder.com/upload/demos/OnParticleCollisionWater1/


Leave a comment

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.