≡
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: "Inte?national"
(you are not logged in)
Text:
[quote][b][/b] wrote: [quote][b][/b] wrote: You need to play around a bit with it. You are probably simply not looking with the camera into the direction where you created the cubes.[/quote] I modified the code, where scale = 500; N= 1000 [code] for(var f=0;f<=N; f++) { cubes.push(new CL3D.CubeSceneNode()); cubes[f].getMaterial(0).Tex1 = engine.getTextureManager().getTexture("resources/crate.jpg", true); cubes[f].Pos.X = Math.random() * scale; cubes[f].Pos.Y = Math.random() * scale; cubes[f].Pos.Z = Math.random() * scale; scene.getRootSceneNode().addChild(cubes[f]); } [/code] and set the camera position to : [code] var cam = new CL3D.CameraSceneNode(); cam.Pos.X = 0; cam.Pos.Y = 0; cam.Pos.Z = scale/2; [/code] My cubes look like this: [img]http://img528.imageshack.us/img528/7904/capturebdd.png[/img] My question is: Is there any particular scale for positioning objects and camera looking in copperlicht. My desired solution is: I want my camera look in middle where my all cubes should be visible. If you notice in the image, my cubes are positioned only half of the canvas. I think there should be some trick with positioning camera. Please I request you to find a solution. I tried in all sort of ways, but couldn't find what I want.[/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