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
- 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
- QR Code Generator Online
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..