fumanshoo Posted November 30, 2012 Share Posted November 30, 2012 So just as a test so that I can better understand the Curve function, I have a character and a box. When ever the character gets less than two units from the cube, the cube moves one unit to the right and one unit forward ( diagonally ). I don't fully understand how to implement a curve function from Aggror's tutorial on YouTube, so I was wondering of you guys could help out... my goal here is to make the cube move smoothly and diagonally... here's the code: box = CreateCube() box:SetPosition(Vec3(5,.5,0)) steamPunk = LoadModel("abstract::steam punk.gmf") steamPunk:SetPosition(Vec3(0,0,0)) steamPunk:SetRotation(Vec3(0,180,0)) steamPunk:SetScale(Vec3(.6,.6,.6)) steamPunk:SetParent(controller) if EntityDistance(controller,box) <2 then MoveEntity(box,Vec3(1,0,1)) end Quote Link to comment Share on other sites More sharing options...
xtreampb Posted December 1, 2012 Share Posted December 1, 2012 this link has a lot of tutorials for LE2. The one you are looking for is the tutorial "Camera Controls". I would recommend reading the PDF instead of watching the video, but that is my preference. http://www.leadwerks.com/wiki/index.php?title=Main_Page I would also recommend bookmarking this link. Good luck to you ~Xtreampb~ 1 Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
fumanshoo Posted December 1, 2012 Author Share Posted December 1, 2012 wow. this is a great source, thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.