mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
fix Windows build and minor format/namechange
This commit is contained in:
parent
d444603a54
commit
821570fa76
6 changed files with 13 additions and 4 deletions
|
@ -1328,6 +1328,8 @@ void MyAvatar::prepareForPhysicsSimulation() {
|
|||
}
|
||||
|
||||
void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
||||
// ANDREW TODO -- measure maxHipOffsetRadius here and transmit that to Rig
|
||||
|
||||
glm::vec3 position = getPosition();
|
||||
glm::quat orientation = getOrientation();
|
||||
if (_characterController.isEnabledAndReady()) {
|
||||
|
|
|
@ -125,7 +125,7 @@ void CharacterController::setDynamicsWorld(btDynamicsWorld* world) {
|
|||
_rigidBody->setGravity(oldGravity);
|
||||
btCollisionShape* shape = _rigidBody->getCollisionShape();
|
||||
assert(shape && shape->getShapeType() == CAPSULE_SHAPE_PROXYTYPE);
|
||||
_ghost.setCharacterShape(static_cast<btCapsuleShape*>(shape)); // KINEMATIC_CONTROLLER_HACK
|
||||
_ghost.setCharacterCapsule(static_cast<btCapsuleShape*>(shape)); // KINEMATIC_CONTROLLER_HACK
|
||||
}
|
||||
// KINEMATIC_CONTROLLER_HACK
|
||||
_ghost.setCollisionGroupAndMask(_collisionGroup, BULLET_COLLISION_MASK_MY_AVATAR & (~ _collisionGroup));
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "CharacterGhostObject.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "CharacterGhostShape.h"
|
||||
|
@ -55,7 +56,7 @@ void CharacterGhostObject::setMotorVelocity(const btVector3& velocity) {
|
|||
}
|
||||
|
||||
// override of btCollisionObject::setCollisionShape()
|
||||
void CharacterGhostObject::setCharacterShape(btCapsuleShape* capsule) {
|
||||
void CharacterGhostObject::setCharacterCapsule(btCapsuleShape* capsule) {
|
||||
assert(capsule);
|
||||
// we create our own CharacterGhostShape which has a larger Aabb for more reliable sweep tests
|
||||
if (_ghostShape) {
|
||||
|
@ -240,7 +241,7 @@ bool CharacterGhostObject::rayTest(const btVector3& start,
|
|||
CharacterRayResult& result) const {
|
||||
if (_world && _inWorld) {
|
||||
_world->rayTest(start, end, result);
|
||||
}
|
||||
}
|
||||
return result.hasHit();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#ifndef hifi_CharacterGhostObject_h
|
||||
#define hifi_CharacterGhostObject_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <btBulletDynamicsCommon.h>
|
||||
#include <BulletCollision/CollisionDispatch/btGhostObject.h>
|
||||
|
||||
|
@ -37,7 +39,7 @@ public:
|
|||
|
||||
const btVector3& getLinearVelocity() const { return _linearVelocity; }
|
||||
|
||||
void setCharacterShape(btCapsuleShape* capsule);
|
||||
void setCharacterCapsule(btCapsuleShape* capsule);
|
||||
|
||||
void setCollisionWorld(btCollisionWorld* world);
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "CharacterRayResult.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "CharacterGhostObject.h"
|
||||
|
||||
CharacterRayResult::CharacterRayResult (const CharacterGhostObject* character) :
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "CharacterSweepResult.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "CharacterGhostObject.h"
|
||||
|
||||
CharacterSweepResult::CharacterSweepResult(const CharacterGhostObject* character)
|
||||
|
|
Loading…
Reference in a new issue