[*] 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