Reputation: 516
I am trying to implement a simple 3d object on the cocos3d template.
Usually you get the object from a POD file or similar.
But what i need is to make it by code in the application.
I have tried CC3BoxNode with CC3BoundingBox. But it isn't what I am looking for.
I need to create something similar to that.
Upvotes: 4
Views: 2355
Reputation: 7865
Did you try this ?
CC3BoundingBox bounds = makeBounds(9.5, 5.0, 4.0, 0, 0, 0);
CC3MeshNode *cube = [[CC3MeshNode alloc] init];
[cube populateAsSolidBox:bounds];
This is the way the boxes are created in the project cited above. I've been playing around with the project and extracted the code to draw just a simple box like this :
Cheers,
Upvotes: 4