Pixeluted
(Pixeluted)
1
Hello. I’m working on a custom movement system and I need to calculate gravity force so that when the player moves he just doesn’t float in the air.
I’m using this code to calculate the next position of the player. and I need to apply gravity force on it.
local newPos = self.AlignPosition.Position + self.MoveVector
Thanks for anyone helping.
Thw_cowl
(DevelloperLua)
2
go in the setting → remove gravity = 0. Player can’t jump now
Pixeluted
(Pixeluted)
3
but I dont need that… did you even read it
Thw_cowl
(DevelloperLua)
4
I’m sorrry, I just don’t understand the ‘float’.
Pixeluted
(Pixeluted)
5
I need so it applies the gravity on the new position
Pixeluted
(Pixeluted)
7
yeah you dont understand what I need
Thw_cowl
(DevelloperLua)
8
So… if the player is in a certain position the gravity changes so that they float, right?
Pixeluted
(Pixeluted)
9
no never, why would I want that for movement system
Thw_cowl
(DevelloperLua)
10
but you say ‘I need to apply gravity force on it’?
Pixeluted
(Pixeluted)
11
yes, so when my characters moves and is in air he will fall down
Thw_cowl
(DevelloperLua)
12
When you change the custom movement the gravity
does not have its effect?
Pixeluted
(Pixeluted)
13
It’s a custom movement system. When players trigger some movement keys it will calculate new positions and move them. It’s not any effect
Thw_cowl
(DevelloperLua)
14
I’m sorry to have taken you so long but I really don’t know the answer to your question. Good Luck!