How to Test if a POINT is inside a HEX! (No Raycasts, Just Simple Math)

https://www.youtube.com/watc...
āœ… Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=dqframYHfws šŸŽ® Take your Skills to the NEXT LEVEL by making a Turn-Based Strategy game! https://unitycodemonkey.com/courses.php?c=turnbasedstrategy šŸŒ Get my Complete Courses! āœ… https://unitycodemonkey.com/courses šŸ‘ Learn to make awesome games step-by-step from start to finish. šŸ‘‡ Click on Show More šŸŽ® Get my Steam Games https://unitycodemonkey.com/gamebundle šŸ”“ RELATED VIDEOS šŸ”“ Hex Pathfinding Unity Tutorial! (Hex Grid System) https://www.youtube.com/watch?v=XqEBu3un1ik Awesome Hex Grid System Unity Tutorial! (Like Civilization, Opus Magnum, Gloomhaven) https://www.youtube.com/watch?v=0nXmuJuWS8I Grid System in Unity (How to make it and where to use it) https://www.youtube.com/playlist?list=PLzDRvYVwl53uhO8yhqxcyjDImRjO9W722 Take your Skills to the NEXT LEVEL by making a Turn-Based Strategy game! (Unity Complete Course) https://www.youtube.com/watch?v=QDr_pjzedv0 How to get Mouse Position in 3D and 2D! https://www.youtube.com/watch?v=0jTPKz3ga4w What is JSON? https://www.youtube.com/watch?v=4oRVMCRCvN0 How to do a BACKSTAB Mechanic! (Learn Vector3.Dot, Elden Ring, Dark Souls) https://www.youtube.com/watch?v=78J493qWfDI Why you should NOT make everything PUBLIC! https://www.youtube.com/watch?v=pD27YuJG3L8 šŸ’¬ Let's learn how to take a point and test if it's inside or outside of a Hex shape. I first researched this because I thought it was necessary to implement a Hex grid, turns out it's not needed, just a simple distance check. But still I kept researching this to improve my own math skills, it's actually based on some simple math and learning that will enable you to understand more complex math. šŸ“ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. šŸŒ Get Code Monkey on Steam! šŸ‘ Interactive Tutorials, Complete Games and More! āœ… https://store.steampowered.com/app/1294220/ If you have any questions post them in the comments and I'll do my best to answer them. šŸ”” Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1 See you next time! šŸ“ Support on Patreon https://www.patreon.com/unitycodemonkey šŸŽ® Grab the Game Bundle at https://unitycodemonkey.com/gameBundle.php šŸ“ Get the Code Monkey Utilities at https://unitycodemonkey.com/utils.php #unitytutorial #unity3d #gamedev -------------------------------------------------------------------- Hello and Welcome! I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#. I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey. I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users. You can see my games at www.endlessloopstudios.com -------------------------------------------------------------------- - Other great Unity channels: Unity - https://www.youtube.com/user/Unity3D Brackeys - https://www.youtube.com/user/Brackeys Dani - https://www.youtube.com/channel/UCIabPXjvT5BVTxRDPCBBOOQ Jabrils - https://www.youtube.com/channel/UCQALLeQPoZdZC4JNUboVEUg BlackthornProd - https://www.youtube.com/channel/UC9Z1XWw1kmnvOOFsj6Bzy2g Sykoo - https://www.youtube.com/user/SykooTV Jason Weimann - https://www.youtube.com/channel/UCX_b3NNQN5bzExm-22-NVVg Jonas Tyroller - https://www.youtube.com/channel/UC_p_9arduPuxM8DHTGIuSOg -------------------------------------------------------------------- - Website: https://unitycodemonkey.com/ - Twitter: https://twitter.com/UnityCodeMonkey - Steam: https://store.steampowered.com/developer/EndlessLoopStudios
Home
/
Indie Game Developers
/
Code Monkey
/
How to Test if a POINT is inside a HEX! (No Raycasts, Just Simple Math)