tag:blogger.com,1999:blog-960296322531827746.post3031964629605685159..comments2023-08-14T01:31:19.210-07:00Comments on Thunderfist: Capsule-Capsule Collision in GamesThunderfisthttp://www.blogger.com/profile/09250922155411121357noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-960296322531827746.post-64788024202282139912016-08-22T04:45:21.323-07:002016-08-22T04:45:21.323-07:00This is my implementation of capsule capsule colli...This is my implementation of capsule capsule collision alg and visualization<br /><br />https://github.com/vbodurov/unity-functions/blob/d65b3a1f757cafbe0fa4289abf84212c356b84c5/UnityFunctions/Assets/Scripts/fun.cs#L305Anonymoushttps://www.blogger.com/profile/02079608716393923084noreply@blogger.comtag:blogger.com,1999:blog-960296322531827746.post-41076934661949000542012-03-09T07:22:09.384-08:002012-03-09T07:22:09.384-08:00Hi Thunderfist.
I am writing a game for mobile. I...Hi Thunderfist.<br /><br />I am <a href="www.blockstory.net" rel="nofollow">writing a game</a> for mobile. I want to rewrite the collision detection system to take advantage of my terrain's characteristics.<br /><br />The game is a world of AABB voxels. The player is a capsule that is always Y aligned. <br /><br />My algorithm to find the voxels that touch the player is this:<br /><br />For every voxel that overlaps the capsule AABB, {<br />find closest point in voxel<br />find closest point in capsule AB segment<br />Check distance^2 < radius^2<br />calculate normal as point in AB - point in voxel<br />}<br /><br />This works great, and it very quickly identifies the voxels that are touching the player.<br /><br />What I am struggling with is movement clipping.<br /><br />I was wondering if you could elaborate on movement clipping? Preferably with some code examples?Paulhttps://www.blogger.com/profile/05118763270998458090noreply@blogger.com