Jump to content

Recommended Posts

Posted

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

Posted

Is it following the pivot's local rotation instead of global? GetRotation(true)

  • Upvote 2

---

Scott

 

Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060

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...