saimonx
saimonx

Reputation: 516

Simple polygon in cocos3d

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. enter image description here

Upvotes: 4

Views: 2355

Answers (2)

yonel
yonel

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 :

Simple cube display with Cocos3D

Cheers,

Upvotes: 4

Mikael
Mikael

Reputation: 3612

Take a look at this example: Bigbot Smash City

Upvotes: 4

Related Questions