From 48f06d69bca44382a089216afaa1cf5fcf4b7b0f Mon Sep 17 00:00:00 2001 From: Turanszki Janos Date: Tue, 28 Apr 2020 00:57:50 +0100 Subject: [PATCH] third person character fix --- scripts/character_controller_tps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/character_controller_tps.lua b/scripts/character_controller_tps.lua index 6c31631f2..925b88dfd 100644 --- a/scripts/character_controller_tps.lua +++ b/scripts/character_controller_tps.lua @@ -277,7 +277,7 @@ Character = { if(vector.Length(self.velocity) < 0.001) then self.state = self.states.STAND end - model_transform.Translate(vector.Subtract(capsulepos, original_capsulepos)) -- transform by the sphere offset + model_transform.Translate(vector.Subtract(capsulepos, original_capsulepos)) -- transform by the capsule offset model_transform.UpdateTransform() -- try to put water ripple if character head is directly above water @@ -427,6 +427,7 @@ runProcess(function() while true do player:Update() camera:Update() + fixedupdate() if(input.Press(KEYBOARD_BUTTON_ESCAPE)) then -- restore previous component @@ -445,7 +446,6 @@ runProcess(function() return end - fixedupdate() end end)