2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Band-aid for poorly modelled stairs

Looks like the Cyan modellers didn't extend the stair ramps all the way
down in some places. To compensate, we can now take higher steps but can't
walk on slopes quite as steep as before. I think this should balance out
nicely.
This commit is contained in:
2012-02-11 01:18:29 -05:00
parent b907f8978a
commit 0689901c5e
2 changed files with 4 additions and 8 deletions

View File

@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsQuat.h"
#define PHYSX_ONLY_TRIGGER_FROM_KINEMATIC 1
#define kSLOPELIMIT (cosf(hsDegreesToRadians(55.f)))
#define kSLOPELIMIT (cosf(hsDegreesToRadians(45.f)))
class plCoordinateInterface;
class plPhysical;

View File

@ -71,13 +71,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define kPhysxSkinWidth 0.1f
#define kPhysZOffset ((fRadius + (fHeight / 2)) + kPhysxSkinWidth)
//#define kSLOPELIMIT (cosf(NxMath::degToRad(55.f)))
//#define kPhysicalHeightFudge 0.4f // this fudge was used for PhysX 2.4
#define kPhysicalHeightFudge 0.0f
//#define STEP_OFFSET 1.0f
#define STEP_OFFSET 0.5f
//#define STEP_OFFSET 0.15f
#define STEP_OFFSET 1.f
#ifndef PLASMA_EXTERNAL_RELEASE
@ -99,9 +94,9 @@ public:
plPXPhysicalControllerCore* ac = plPXPhysicalControllerCore::FindController(hit.controller);
NxActor& actor = hit.shape->getActor();
plPXPhysical* phys = (plPXPhysical*)actor.userData;
static float SlopeLimit = kSLOPELIMIT;
hsVector3 normal = plPXConvert::Vector(hit.worldNormal);
ac->fMovementInterface->IAddContactNormals(normal);
#ifndef PLASMA_EXTERNAL_RELEASE
plDbgCollisionInfo info;
info.fNormal = normal;
@ -124,6 +119,7 @@ public:
}
ac->fDbgCollisionInfo.Append(info);
#endif PLASMA_EXTERNAL_RELEASE
// If the avatar hit a movable physical, apply some force to it.
hsVector3 dir = plPXConvert::Vector(hit.dir);
float dirdotup=dir.fZ;