Search the Community
Showing results for tags 'waypoint'.
-
Hi Guys I have a problem ,I,m using using the script by Nick.ace (thanks Nick) like attached. Offcourse the default crawler works fine with a simple animation sequence.But for example rigs from dexsoft, arteria, Fuse (Mixamo Rigged) and the ones i made myself seem not to be able to go to the specified waypoint. Animation works fine on all models. Wierd thing is, even removing the animation the entity doesn't follow (goto) the specified waypoints.It doesn't move at all. Maybey related to Character Controller settings? (for the record I used the crawler settings). Setting the mass as a test to 600 will move the character a few inches. Or am i missing some script related things (I'm a LUA and programming noob but learning). By the way.. currently converting some game content from my stores (other engines) to leadwerks and will make them available for free later next month on steam. Any ideas Thanks Script.Speed=1.0--float Script.Sequence=0--int function Script:Start() self.patrol={} self.currentpatrol=0 self.patrol[0]=self.entity:FindChild("Pivot0"):GetPosition()+self.entity:GetPosition() self.patrol[1]=self.entity:FindChild("Pivot1"):GetPosition()+self.entity:GetPosition() self.patrol[2]=self.entity:FindChild("Pivot2"):GetPosition()+self.entity:GetPosition() end function Script:UpdatePhysics() self.entity:GoToPoint(self.patrol[self.currentpatrol].x,self.patrol[self.currentpatrol].y,self.patrol[self.currentpatrol].z,1.5,1) if self.entity:GetPosition():DistanceToPoint(self.patrol[self.currentpatrol])<1 then self.currentpatrol=self.currentpatrol+1 if self.currentpatrol>=3 then self.currentpatrol=0 end end end function Script:Draw() self.entity:SetAnimationFrame(8,1,4) local t = Time:GetCurrent() self.entity:SetAnimationFrame(t/100.0*self.Speed,1,self.Sequence) end