I want to add a PhysicsSprite3D in a scene. But it shows a weird error. (I think I did the Physics3D setup wrong.)
(ThreeD is the name of my class)
#include "physics3d/CCPhysics3D.h"
// the following code is in the ThreeD::createScene() function
auto scene = ThreeD::createWithPhysics();
scene->getPhysics3DWorld()->setDebugDrawEnable(true);
return scene;
// the following code is in the ThreeD::init() function
Physics3DRigidBodyDes rbDes;
rbDes.mass = 0.0f;
rbDes.shape = Physics3DShape::createBox(Vec3(12.0f, 12.0f, 12.0f));
auto spr = PhysicsSprite3D::create("sprites/cubie.obj", &rbDes);
spr->setTexture("sprites/cubietexture.png");
spr->setScale(12);
this->addChild(spr); // as soon as the program executes this, an error occurs
This is the image of the error. (It doesn’t show anything in the console.)
I will upload the full code if you need it.
Thanks!