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
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- 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
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- [Asset Store] Mobile Paint *now free on
- Scorched Earth Terrain (wip) on
- UI Text TypeWriter Effect [Script] on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on