1
2013
Testing OnParticleCollision()
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/
Related Posts
Leave a comment
Recent posts
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
- UnityHub: Add support for custom project title (instead of folder name) or use ProductName
- Testing Unity MUSE AI