Hello, I want make a simple 2D space flying but I want to have 3D ships models. I have some problems to do that.
-
I have problem with wrong(?) coordinates. When I model my object in blender I position it like this, because I assume that in cocos2d X axis is left-right, Y axis is up-down and Z axis is deep:
https://lh5.googleusercontent.com/N5T9F3CwOlbtZFisWtyDwbg5cs8msnvrf8Trr-ie46wVU4UBMw3Hsl1HGJI2Qk4GG_unq1gkImgZJonHdReo=w1920-h991
But when I import the model it is flipped around X axis by 90degrees, so I must rotate this object. This is anoying, because when I add sprite to my model i must rotate my sprite by X axis by -90 degrees. Am I doing something wrong?
// Okay I resolve 1 problem. I must changed that Y is my UP Axis.
https://docs.unity3d.com/Manual/HOWTO-FixZAxisIsUp.html -
I want to have built-in 2D physics in my game, but I cannot position the collider right. With this code I cant even see the box (with debug draw on):
auto collisionBox = PhysicsBody::createBox(Size(3000.0f, 2000.0f), PhysicsMaterial(0.1f, 1.0f, 0.0f));
model->addComponent(collisionBox);
But when I run that action:
RotateBy::create(10, Vec3(0, 360, 0));
I can see huge red square blink two frames.
Any tips? I read cocos2d-x Programmer guide and it doesn’t resolve my problems.