MCPcopy Create free account
hub / github.com/doldecomp/mkdd / IsHitKart

Method IsHitKart

src/Sato/GeographyObj.cpp:221–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool GeographyObj::IsHitKart(const JGeometry::TVec3f &spherePos, f32 sphereRadius, JGeometry::TVec3f *posAdjust)
222{
223 bool isHit = false;
224 ObjColBase **pBounds = mBounds;
225 for (u8 i = 0; i < mBoundsNum; i++, pBounds++) {
226 if ((*pBounds)->IsHitSphere(getBoundsGlPos(i), spherePos, sphereRadius)) {
227 if (posAdjust && (_58 != 2)) {
228 JGeometry::TVec3f collPos = (*pBounds)->getPos();
229 f32 distance = (*pBounds)->getBoundDepth();
230 collPos *= distance;
231 *posAdjust += collPos;
232 }
233 isHit = true;
234 }
235 }
236 return isHit;
237}
238
239bool GeographyObj::IsHitObject(const JGeometry::TVec3f &hitCheckPos, ObjColBase *collider)
240{

Callers

nothing calls this directly

Calls 2

IsHitSphereMethod · 0.80
getBoundDepthMethod · 0.80

Tested by

no test coverage detected