Fehler: Collider kopiert, aber Form ist nullptr! JoltphysikC++

Programme in C++. Entwicklerforum
Guest
 Fehler: Collider kopiert, aber Form ist nullptr! Joltphysik

Post by Guest »

Ich versuche, Jolt Physics in meinem C ++ - Spiel zu verwenden, aber zur Laufzeit ein Problem. [Fehler] Collider kopiert, aber Form ist nullptr! [*] Setup Jolt Physics mit VCPKG
[*] Kompilierte das Paket mit CMake
[*] Verknüpfte die kompilierte Bibliothek (Jolt.Lib) rechts < BR/>
Ich habe festgestellt, dass mShapeptr in JPh :: BoxShapesettings -Einstellungen in Physicicsgine :: Addbody Ist eingestellt, aber nicht mShape , aber ich weiß nicht warum ...
Gibt es etwas, das ich vermisse?
Hier ist ein Code aus meinem Projekt: < /p>

Code: Select all

#include 

// --- Minimal Collider implementation ---
namespace BlockyBuild {

enum ColliderTypes {
BoxCollider,
TriangleCollider
};

class Collider {
ColliderTypes type;
JPH::Vec3 scale;
JPH::Vec3 center;
JPH::Ref shape;
public:
// Constructor.
Collider(ColliderTypes type, const JPH::Vec3& scale, const JPH::Vec3& center = {0, 0, 0})
: type(type), scale(scale), center(center) {}

// Copy constructor.
Collider(const Collider& other)
: type(other.type), scale(other.scale), center(other.center), shape(other.shape)
{
if (shape) {
std::cerr

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post