≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Adding multiple CubeSceneNodes [Cubes] to Canvas?
Posted by:
(you are not logged in)
Enter the missing letter in: "Inter?ational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Looks like you solved it yourself already. to make the positions look more like in the image below, also set the .Z position to some value. Currently, you set all to 0. Another idea would be to set all positions to a random one, like yournode.Pos.X = Math.random() * 100.0f; But your image looks like the cubes are distributed on a grid, so I guess they are doing it somehow like this: [code] var c = 5; var scale = 2; for (var x=0; x<c; ++x) for (var y=0; y<c; ++y) for (var z=0; z<c; ++z) { var b = new CL3D.CubeSceneNode(); scene.getRootSceneNode().addChild(b); b.Pos.X = x * scale; b.Pos.Y = y * scale; b.Pos.Z = z * scale; } [/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact