ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator PathSceneNode
person icon
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.

person icon
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:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |