Slastraf Posted March 30, 2016 Share Posted March 30, 2016 https://youtu.be/mcJiROYmByk I made a Video for this, because it is hard to explain. The player is not rotated right with the pivot that is at the same position, the green box ( camera ) is a child of the pivot. function Script:UpdatePhysics() local move = ((window:KeyDown(Key.D) and 1 or 0) - (window:KeyDown(Key.A) and 1 or 0))*4 local strafe = ((window:KeyDown(Key.W)and 1 or 0) - (window:KeyDown(Key.S) and 1 or 0))*4 if window:KeyDown(Key.W)then self.entity:SetInput(self.pivot:GetRotation().y ,0,0) end end Quote Link to comment Share on other sites More sharing options...
Jazz Posted March 30, 2016 Share Posted March 30, 2016 Is it following the pivot's local rotation instead of global? GetRotation(true) 2 Quote --- Scott Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060 Link to comment Share on other sites More sharing options...
Slastraf Posted March 30, 2016 Author Share Posted March 30, 2016 Is it following the pivot's local rotation instead of global? GetRotation(true) That fixed it. 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.