#My Slide system is kinda buggy.
1 messages · Page 1 of 1 (latest)
I might not know the answer but u Wana point out smth where you spamming the slide or is it suposed to be like that
its not supposed to do that
Personally i think u have probably a mistake in logic
This jittering might be caused by constantly applied BodyVelocity on your character, thats why on the ground for example every jitter it's pushed forward
I assume that you have method :Update() in some kind of loop because there is an argument deltaTime
Look, it will begin your slide, and after next update will see that its active and key is still down and will stop it
I think its looping when it ends making it look like that idk sbt the jitteringn
That's my point
Or don't loop it at all
Loop only momentum
For example use task.spawn or heartbeat to update momentum if key is down
Wyt
??
No I jd dont know what hearbeat is or task.spawn
are u a scripter?
I see
I’ll try this
The slide system I made I simply play a sliding animation and then use body movers to temporarily apply forward force. Maybe try something similar and see if that helps.
im new
He wanted to do something better and code own momentem
ty bacon
i got it to work
now i js gotta mess around with variables till i am satisfied
id rather just use modules tbh
What was the issue?
I think it was just my logic
This was the architecture before:
Every frame: MovementController:Update() → ability:Update() → ability checks InputManager:IsKeyDown() → ability decides to Start / Stop
And this is it now;
`Every frame:
MovementController:Update()
→ updates shared state (Grounded, etc.)
→ ability:Update()
ability:Update():
→ checks InputManager:ConsumePressed() ONCE
→ decides to Start()
→ checks InputManager:ConsumeReleased() ONCE
→ decides to Stop()
→ if Active:
→ applies physics (friction, momentum decay, slope, etc.) `
Good
I cooked, did i?