GithubHelp home page GithubHelp logo

diharaw / physx-ragdoll Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 2.0 3.23 MB

A sample demonstrating ragdoll physics using Nvidia PhysX.

License: MIT License

CMake 2.51% C++ 92.49% GLSL 5.00%
physx physx-sdk opengl ragdoll

physx-ragdoll's People

Contributors

diharaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gonnavis knut0815

physx-ragdoll's Issues

How to build and run for Visual Studio 22

Requirements: CMake, Git, Python(3.12.2 worked for me)

  1. Open up cmd in the directory you want to download the project to.
  2. Execute these commands:
git clone --recursive https://github.com/diharaw/physx-ragdoll.git
cd physx-ragdoll
mkdir build
cd build
cmake -G "Visual Studio 17" ..
  1. Go down into "physx-ragdoll/external/PhysX/physx/buildtools/presets/public" and create a file called vc17win64.xml containing the following:
<?xml version="1.0" encoding="utf-8"?>
<preset name="vc17win64" comment="VC17 Win64 PhysX general settings">
  <platform targetPlatform="win64" compiler="vc17" />
  <CMakeSwitches>
    <cmakeSwitch name="PX_BUILDSNIPPETS" value="True" comment="Generate the snippets" />
    <cmakeSwitch name="PX_BUILDPUBLICSAMPLES" value="True" comment="Generate the samples projects" />
    <cmakeSwitch name="PX_GENERATE_STATIC_LIBRARIES" value="False" comment="Generate static libraries" />
    <cmakeSwitch name="NV_USE_STATIC_WINCRT" value="False" comment="Use the statically linked windows CRT" />
    <cmakeSwitch name="NV_USE_DEBUG_WINCRT" value="True" comment="Use the debug version of the CRT" />
    <cmakeSwitch name="PX_FLOAT_POINT_PRECISE_MATH" value="False" comment="Float point precise math" />
  </CMakeSwitches>
  <CMakeParams>
    <cmakeParam name="CMAKE_INSTALL_PREFIX" value="install/vc15win64/PhysX" comment="Install path relative to PhysX SDK root" />
  </CMakeParams>
</preset>
  1. Go back up to "physx-ragdoll/external/PhysX/physx" and run the generate_projects.bat file selecting vc17win64 which is the one we added.

  2. Open the physx solution in "physx-ragdoll/external/PhysX/physx/compiler/vc17win64" and build.

  3. If you get an error about typeinfo.h not existing just turn the #include <typeinfo.h> into #include <typeinfo> and compile again.

  4. Head into "physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/" copy the DLLs into "physx-ragdoll/bin/Debug".

  5. Open up the "physx-ragdoll/build/PhysXRagdoll.sln" solution and set the PhysXRagdoll project as startup.

  6. In main.cpp add the following lines:

#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysX_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXCommon_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXCooking_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXFoundation_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXExtensions_static_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXPvdSDK_static_64.lib")
#pragma comment(lib, "INSERT_YOUR_ABSOLUTE_PATH_HERE/physx-ragdoll/external/PhysX/physx/bin/win.x86_64.vc142.md/debug/PhysXCharacterKinematic_static_64.lib")

(If you actually know how to use cmake you can probably add them to be linked properly)
10. You should be able to compile at this point.
11. Head over to mixamo and download the Paladin J Nordstrom character, rename it to paladin.fbx and move it into "physx-ragdoll/bin/Debug/mesh"

You should be good to run the physxragdoll project from there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.