Ctrl + [, S
Monday, August 28, 2023
Thursday, August 24, 2023
Collision detection : Circle vs Rectangle
detection only
int CheckHit( F_RECT *prcRect1, F_CIRCLE *pcrCircle2 )
{
int nResult = false;
float ar;
if ( ( pcrCircle2->x > prcRect1->fLeft - pcrCircle2->r ) &&
( pcrCircle2->x < prcRect1->fRight + pcrCircle2->r ) &&
( pcrCircle2->y > prcRect1->fTop - pcrCircle2->r ) &&
( pcrCircle2->y < prcRect1->fBottom + pcrCircle2->r ) )
{
nResult = true;
ar = pcrCircle2->r;
if ( pcrCircle2->x < prcRect1->fLeft ) {
if ( ( pcrCircle2->y < prcRect1->fTop ) )
{
if ( ( DistanceSqr( prcRect1->fLeft, prcRect1->fTop,
pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {
nResult = false;
}
}
else {
if ( ( pcrCircle2->y > prcRect1->fBottom ) )
{
if ( ( DistanceSqr( prcRect1->fLeft, prcRect1->fBottom,
pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {
nResult = false;
}
}
}
}
else {
if ( pcrCircle2->x > prcRect1->fRight ) {
if ( ( pcrCircle2->y < prcRect1->fTop ) )
{
if ( ( DistanceSqr( prcRect1->fRight, prcRect1->fTop,
pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {
nResult = false;
}
}
else {
if ( ( pcrCircle2->y > prcRect1->fBottom ) )
{
if ( ( DistanceSqr( prcRect1->fRight, prcRect1->fBottom,
pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {
nResult = false;
}
}
}
}
}
}
return nResult;
}
Wednesday, August 9, 2023
대화의 격률
https://ko.wikipedia.org/wiki/%EA%B7%B8%EB%9D%BC%EC%9D%B4%EC%8A%A4%EC%9D%98_%EB%8C%80%ED%99%94%EA%B2%A9%EB%A5%A0
Task in UnrealEngine
https://www.youtube.com/watch?v=1lBadANnJaw
-
Unity released very good FPS example for people and I decided to analysis how they make this. Personally I wanted to show you how I analys...
-
When we use DrawDebugSphere function for debugging, it is working well but when you are trying to use it in anim node's function it will...
-
If you press a key 'L' in the jupyter notebook then you can see the line number in the editor.