Jump to content

Recommended Posts

Posted

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

Posted

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~

  • Upvote 1

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!

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...