fumanshoo Posted November 30, 2012 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
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.