Improved CharacterDemo/KinematicCharacterController, dynamic objects will bounce off.
Don't create a todo list for doxygen by default (the chaotic todo's would confuse most developers) Improve support for small objects, by having dynamic contact breaking thresholds. Still needs small internal timestep and some GJK improvements.
This commit is contained in:
@@ -92,7 +92,7 @@ void CharacterDemo::initPhysics()
|
||||
btScalar characterWidth =1.75;
|
||||
btConvexShape* capsule = new btCapsuleShape(characterWidth,characterHeight);
|
||||
m_ghostObject->setCollisionShape (capsule);
|
||||
m_ghostObject->setCollisionFlags (btCollisionObject::CF_NO_CONTACT_RESPONSE);
|
||||
m_ghostObject->setCollisionFlags (btCollisionObject::CF_CHARACTER_OBJECT);
|
||||
|
||||
btScalar stepHeight = btScalar(0.35);
|
||||
m_character = new KinematicCharacterController (m_ghostObject,capsule,stepHeight);
|
||||
@@ -103,7 +103,7 @@ void CharacterDemo::initPhysics()
|
||||
|
||||
|
||||
///only collide with static for now (no interaction with dynamic objects)
|
||||
m_dynamicsWorld->addCollisionObject(m_ghostObject,btBroadphaseProxy::DebrisFilter, btBroadphaseProxy::StaticFilter);
|
||||
m_dynamicsWorld->addCollisionObject(m_ghostObject,btBroadphaseProxy::CharacterFilter, btBroadphaseProxy::StaticFilter|btBroadphaseProxy::DefaultFilter);
|
||||
|
||||
|
||||
////////////////
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
#include "LinearMath/btDefaultMotionState.h"
|
||||
#include "KinematicCharacterController.h"
|
||||
|
||||
/* TODO:
|
||||
* Interact with dynamic objects
|
||||
* Ride kinematicly animated platforms properly
|
||||
* More realistic (or maybe just a config option) falling
|
||||
* -> Should integrate falling velocity manually and use that in stepDown()
|
||||
* Support jumping
|
||||
* Support ducking
|
||||
*/
|
||||
///@todo Interact with dynamic objects,
|
||||
///Ride kinematicly animated platforms properly
|
||||
///More realistic (or maybe just a config option) falling
|
||||
/// -> Should integrate falling velocity manually and use that in stepDown()
|
||||
///Support jumping
|
||||
///Support ducking
|
||||
class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -259,7 +259,7 @@ void ConcaveDemo::initPhysics()
|
||||
createCollisionLocalStoreMemory,
|
||||
maxNumOutstandingTasks));
|
||||
#else
|
||||
///todo other platform threading
|
||||
///@todo show other platform threading
|
||||
///Playstation 3 SPU (SPURS) version is available through PS3 Devnet
|
||||
///Libspe2 SPU support will be available soon
|
||||
///pthreads version
|
||||
|
||||
@@ -86,7 +86,7 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
createCollisionLocalStoreMemory,
|
||||
maxNumOutstandingTasks));
|
||||
#else
|
||||
///todo other platform threading
|
||||
///@todo other platform threading
|
||||
///Playstation 3 SPU (SPURS) version is available through PS3 Devnet
|
||||
///Libspe2 SPU support will be available soon
|
||||
///pthreads version
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#define USE_ORIGINAL 1
|
||||
#ifndef USE_ORIGINAL
|
||||
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h"
|
||||
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
|
||||
#endif //USE_ORIGINAL
|
||||
|
||||
static bool gRefMode = false;
|
||||
|
||||
@@ -13,11 +13,11 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/// September 2006: VehicleDemo is work in progress, this file is mostly just a placeholder
|
||||
/// This VehicleDemo file is very early in development, please check it later
|
||||
/// One todo is a basic engine model:
|
||||
/// A function that maps user input (throttle) into torque/force applied on the wheels
|
||||
/// with gears etc.
|
||||
///September 2006: VehicleDemo is work in progress, this file is mostly just a placeholder
|
||||
///This VehicleDemo file is very early in development, please check it later
|
||||
///@todo is a basic engine model:
|
||||
///A function that maps user input (throttle) into torque/force applied on the wheels
|
||||
///with gears etc.
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user