mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-10-20 10:37:37 -04:00
Make contact filtering on portals more accurate the portal surface
This commit is contained in:
parent
55142fe61c
commit
02d3bb6e7e
|
@ -186,7 +186,8 @@ int collisionSceneIsTouchingSinglePortal(struct Vector3* contactPoint, struct Ve
|
|||
return 0;
|
||||
}
|
||||
|
||||
localPoint.x *= (1.0f / PORTAL_X_RADIUS);
|
||||
localPoint.x *= (2.0f / PORTAL_COVER_WIDTH);
|
||||
localPoint.y *= (2.0f / PORTAL_COVER_HEIGHT);
|
||||
localPoint.z = 0.0f;
|
||||
|
||||
if (vector3MagSqrd(&localPoint) >= 1.0f) {
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
#include "defs.h"
|
||||
#include "point_constraint.h"
|
||||
|
||||
#define PORTAL_COVER_HEIGHT 0.708084f
|
||||
#define PORTAL_COVER_WIDTH 0.84085f
|
||||
|
||||
#define PORTAL_THICKNESS 0.11f
|
||||
#define PORTAL_X_RADIUS 0.5f
|
||||
|
||||
struct CollisionScene {
|
||||
struct CollisionObject* quads;
|
||||
|
|
|
@ -36,9 +36,6 @@ struct Portal {
|
|||
struct Quaternion relativeRotation;
|
||||
};
|
||||
|
||||
#define PORTAL_COVER_HEIGHT 0.708084f
|
||||
#define PORTAL_COVER_WIDTH 0.84085f
|
||||
|
||||
#define NO_PORTAL 0xFF
|
||||
|
||||
#define PORTAL_RENDER_TYPE_VISIBLE_0 (1 << 0)
|
||||
|
|
Loading…
Reference in a new issue