Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
PathSceneNode

mushra
Registered User
Quote
2011-12-10 20:49:36

Would anyone be able to give me a quick example of how to create a path to follow, I keep getting undefined errors when I try to create one.
Thanks.


niko
Moderator
Quote
2011-12-11 08:23:07

Should work like this:

var p = new CL3D.PathSceneNode();

p.Pos = new CL3D.Vect3d();
p.Rot = new CL3D.Vect3d();
p.Scale = new CL3D.Vect3d(1,1,1);
p.Visible = true;
p.scene = scene;

//p.Box = someBoundingBox;
p.Tightness = 0.5;
p.IsClosedCircle = false;

// add your points like this:
for (var i=0; i<countPoints; ++i)
p.Nodes.push(someVectorPointPosition);

yourParentNode.addChild(p);
p.updateAbsolutePosition();



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

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