diff --git a/src/Systems/PhysicsSystem.cpp b/src/Systems/PhysicsSystem.cpp index aa4fc6b..eef803f 100644 --- a/src/Systems/PhysicsSystem.cpp +++ b/src/Systems/PhysicsSystem.cpp @@ -1,9 +1,9 @@ #include "PrecompiledHeader.h" -#include + // We’re not using anything product specific yet. We undef these so we don’t get the usual // product initialization for the products. #undef HK_FEATURE_PRODUCT_AI -//#undef HK_FEATURE_PRODUCT_ANIMATION +#undef HK_FEATURE_PRODUCT_ANIMATION #undef HK_FEATURE_PRODUCT_CLOTH #undef HK_FEATURE_PRODUCT_DESTRUCTION_2012 #undef HK_FEATURE_PRODUCT_DESTRUCTION @@ -15,8 +15,12 @@ #define HK_EXCLUDE_FEATURE_RegisterVersionPatches #define HK_EXCLUDE_FEATURE_RegisterReflectedClasses #define HK_EXCLUDE_FEATURE_MemoryTracker +#define HK_CLASSES_FILE "Common/Serialize/classlist/hkClasses.h" +#include "Common/Serialize/Util/hkBuiltinTypeRegistry.cxx" +#define HK_COMPAT_FILE "Common/Compat/hkCompatVersions.h" // This include generates an initialization function based on the products // and the excluded features. +#include #include #include "PhysicsSystem.h" #include "World.h" @@ -30,7 +34,7 @@ Systems::PhysicsSystem::PhysicsSystem(World* world) : System(world) hkMemoryRouter* memoryRouter = hkMemoryInitUtil::initDefault(hkMallocAllocator::m_defaultMallocAllocator, finfo); hkBaseSystem::init(memoryRouter, HavokErrorReport); - { + hkpWorldCinfo worldInfo; worldInfo.setupSolverInfo(hkpWorldCinfo::SOLVER_TYPE_4ITERS_MEDIUM); worldInfo.m_gravity = hkVector4(0.0f, -9.8f, 0.0f); @@ -39,7 +43,7 @@ Systems::PhysicsSystem::PhysicsSystem(World* world) : System(world) // You must specify the size of the broad phase - objects should not be simulated outside this region worldInfo.setBroadPhaseWorldSize(1000.0f); m_PhysicsWorld = new hkpWorld(worldInfo); - } + // Register all collision agents, even though only box - box will be used in this particular example. // It's important to register collision agents before adding any entities to the world. hkpAgentRegisterUtil::registerAllAgents(m_PhysicsWorld->getCollisionDispatcher()); @@ -59,7 +63,7 @@ Systems::PhysicsSystem::PhysicsSystem(World* world) : System(world) void Systems::PhysicsSystem::Update(double dt) { - m_PhysicsWorld->stepDeltaTime(dt); + m_PhysicsWorld->stepDeltaTime(0.0166f); // Step the visual debugger StepVisualDebugger(); @@ -118,7 +122,7 @@ void Systems::PhysicsSystem::StepVisualDebugger() void HK_CALL Systems::PhysicsSystem::HavokErrorReport(const char* msg, void*) { - LOG_ERROR("%s", msg); + LOG_DEBUG("%s", msg); } diff --git a/src/Systems/PhysicsSystem.h b/src/Systems/PhysicsSystem.h index d85342c..daec8d8 100644 --- a/src/Systems/PhysicsSystem.h +++ b/src/Systems/PhysicsSystem.h @@ -8,6 +8,8 @@ #include "System.h" #include "Components/Transform.h" + + // Math and base include #include diff --git a/vs11/Returngeance/Returngeance.vcxproj b/vs11/Returngeance/Returngeance.vcxproj index 828d5e9..ed68d23 100644 --- a/vs11/Returngeance/Returngeance.vcxproj +++ b/vs11/Returngeance/Returngeance.vcxproj @@ -40,7 +40,7 @@ $(HAVOK_ROOT)\Source;$(BOOST_ROOT);$(SolutionDir)\..\src;$(SolutionDir)\..\libs;$(SolutionDir)\..\libs\glew-1.10.0\include;$(SolutionDir)\..\libs\glfw-3.0.4\include;$(SolutionDir)\..\libs\glm-0.9.5.3;$(SolutionDir)\..\libs\openal-soft-1.15.1\include;$(SolutionDir)\..\libs\bullet-2.82-r2704\src;$(SolutionDir)\..\libs\SOIL\src;$(IncludePath) - $(HAVOK_ROOT)\Lib\win32_vs2012_win7\debug;$(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\..\libs\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\..\libs\glfw-3.0.4\lib\Debug;$(SolutionDir)\..\libs\openal-soft-1.15.1\lib\Win32\Debug;$(SolutionDir)\..\libs\bullet-2.82-r2704\lib\Debug;$(SolutionDir)\..\libs\SOIL\lib\Debug;$(LibraryPath) + $(HAVOK_ROOT)\Lib\win32_vs2012_win7\debug_dll;$(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\..\libs\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\..\libs\glfw-3.0.4\lib\Debug;$(SolutionDir)\..\libs\openal-soft-1.15.1\lib\Win32\Debug;$(SolutionDir)\..\libs\bullet-2.82-r2704\lib\Debug;$(SolutionDir)\..\libs\SOIL\lib\Debug;$(LibraryPath) $(SolutionDir)\..\bin\$(Configuration)\ $(SolutionDir)\..\obj\$(Configuration)\ @@ -59,11 +59,13 @@ Create PrecompiledHeader.h true - MultiThreadedDebug + MultiThreadedDebugDLL + StreamingSIMDExtensions2 + false true - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32d.lib;glfw3.lib;hkBase.lib;hkVisualize.lib;hkInternal.lib;hkSerialize.lib;hkGeometryUtilities.lib;hkcdInternal.lib;hkcdCollide.lib;hkpCollide.lib;hkpConstraint.lib;hkpConstraintSolver.lib;hkpDynamics.lib;hkpInternal.lib;hkpUtilities.lib;hkpVehicle.lib;hkSceneData.lib;%(AdditionalDependencies) + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32d.lib;glfw3.lib;hkBase.lib;hkVisualize.lib;hkInternal.lib;hkSerialize.lib;hkGeometryUtilities.lib;hkcdInternal.lib;hkcdCollide.lib;hkpCollide.lib;hkpConstraint.lib;hkpConstraintSolver.lib;hkpDynamics.lib;hkpInternal.lib;hkpUtilities.lib;hkSceneData.lib;%(AdditionalDependencies) /ignore:4221 @@ -81,12 +83,13 @@ _CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions) Create PrecompiledHeader.h + StreamingSIMDExtensions2 true true true - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32.lib;glfw3.lib;hkBase.lib;hkVisualize.lib;hkInternal.lib;hkSerialize.lib;hkGeometryUtilities.lib;hkcdInternal.lib;hkcdCollide.lib;hkpCollide.lib;hkpConstraint.lib;hkpConstraintSolver.lib;hkpDynamics.lib;hkpInternal.lib;hkpUtilities.lib;%(AdditionalDependencies) + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32.lib;glfw3.lib;hkaAnimation.lib;hkaInternal.lib;hkaPhysics2012Bridge.lib;hkBase.lib;hkcdCollide.lib;hkcdInternal.lib;hkCompat.lib;hkgBridge.lib;hkgCommon.lib;hkgDx11.lib;hkgDx9s.lib;hkGeometryUtilities.lib;hkgOglES.lib;hkgOglES2.lib;hkgOgls.lib;hkgSoundCommon.lib;hkgSoundXAudio2.lib;hkInternal.lib;hkpCollide.lib;hkpConstraint.lib;hkpConstraintSolver.lib;hkpDynamics.lib;hkpInternal.lib;hkpUtilities.lib;hkpVehicle.lib;hkSceneData.lib;hkSerialize.lib;hkVisualize.lib;%(AdditionalDependencies)