26
2012
Monotone Chain Convex Hull Algorithm
Finally got atleast some 2D convex hull algorithm working.. this one is converted from those Java & Python versions.
Converted the java version first and it kept giving strange results, then took the sub() from python and it worked rightaway..
Now can try this for the shadow casting test, should be possible to cast somekind of shadows to a flat surface(?)
It was quite difficult to sort an Vector3 array with javascript in Unity..
founded some help from unity answers, but most of those examples didnt seem to work without modifications..
Webplayer:
nothing much to see on it..
Download source:
MonotoneChainConvexHull.unitypackage (javascript)
Related Posts
5 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- 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)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
Can I please get this code to play with looks very interesting!? 🙂
Source added!
convex hull (source):
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2
Could I use this script in my game?
yes, it was originally just converted to unityscript from some of those wikipedia articles/links..