Search the Community
Showing results for tags 'ThirdPerson'.
-
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
- 2 replies
-
- Player
- ThirdPerson
-
(and 1 more)
Tagged with:
-
So i was starting a new project and modeled an Player with some bones. It is in a third person view and the problem is that you cant see where the player looks (to pick up objects). So I just started to Insert the camrotation on the x axis inro a SetRotation function. 1. function Script:UpdateWorld() 2. self.entity:SetRotation(Math:self.camRotation.x,0,0) 3. 4. end I get the error: function arguments exspected near "." , (in the 2. line) The herarchy looks sth like this : Player(fpsPlayer) SantaModel ->arms ... -> Head (right here is the Script attached) Camera(this has no script but is attached to Player) I dont know wheres the problem , it is probably some newbie mistake. To make sure, the camRotation.x is in an other script.
- 5 replies
-
- Math:self.camRotation.x
- Programming
-
(and 2 more)
Tagged with:
-
So i was starting a new project and modeled an Player with some bones. It is in a third person view and the problem is that you cant see where the player looks (to pick up objects). So I just started to Insert the camrotation on the x axis inro a SetRotation function. 1. function Script:UpdateWorld() 2. self.entity:SetRotation(Math:self.camRotation.x,0,0) 3. 4. end I get the error: function arguments exspected near "." , (in the 2. line) The herarchy looks sth like this : Player(fpsPlayer) SantaModel ->arms ... -> Head (right here is the Script attached) Camera(this has no script but is attached to Player) I dont know wheres the problem , it is probably some newbie mistake. To make sure, the camRotation.x is in an other script.
- 1 reply
-
- Math:self.camRotation.x
- Programming
-
(and 2 more)
Tagged with: