Angelwolf Posted January 11, 2016 Share Posted January 11, 2016 Okay, so I'm trying to have my 3rd person model (at a side on, 2d style view) look left when walking left, and to look right when walking right. So far, walking right is not a problem. The model animates and walks, facing the correct direction. When walking left, however, the model 'moonwalks'. He'll move backwards, but will face forwards. local movex=0 local movez=0 self.input[0]=0 self.input[1]=0 if window:KeyDown(Key.D) then self.animationmanager:SetAnimationSequence("Run",self.animspeedrun,300) self.input[1]=self.input[1]+1 self.animationmanager:SetAnimationSequence("Idle",self.animspeedrun,300) end if window:KeyDown(Key.A) then self.entity:SetRotation(0,-90,0) self.animationmanager:SetAnimationSequence("Run",self.animspeedrun,300) self.input[1]=self.input[1]-1 self.animationmanager:SetAnimationSequence("Idle",self.animspeedrun,300) end if window:KeyDown(Key.S) then self.entity:SetRotation(0,-180,0) end if window:KeyDown(Key.W) then self.entity:SetRotation(0,365,0) end local playerMovement = Vec3(0) playerMovement.x = self.input[0] * self.moveSpeed playerMovement.z = self.input[1] * self.moveSpeed Any ideas? Quote My Games: Nightmare Prism:::WolfTale:::Dungeon Creeper:::Despair of Ordinary Men:::Piano Simulator 2016:::House (W.I.P) 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.