Jump to content

Player aligns wrong with the camera


Slastraf
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...