I’m also encountering this issue; I thought it was caused by something else but if you’re also having the same issue will also assume it’s the module.
ok sir yes sir … (It kinda looks stupid I agree)
I’ve already mentioned this in Discord, but I’ll reiterate it here to inform others.
The issue with shadow flickering stems from a module near alpha 1 (it occurs slightly earlier), a problem that many are aware of. Omrez claimed to have “fixed” the problem by clamping the alpha value, but this merely led to unintended behavior with enemies being teleported to the end too early.
After conducting a thorough investigation, I’ve quickly identified the problem originating from the “Progress” calculation within the CalculateUniform functions. Here, a division by zero occurs, resulting in values becoming inf/nan.
The solution is to lock it at a progress of 1 (I assume), though I haven’t tested the fix yet. I’ll add an if statement as a test. Omrez has requested me to address the issue, but personally, I’m unsure how to optimize this without necessitating additional statements or unnecessary calculations.
yes i did use chat gpt to fix my sentence to sound more professional here :troll;
function BezierPath:CalculateUniformCFrame(T: number): CFrame
local TranslatedIndex = math.min(math.floor(math.clamp(T,0,1) * self.ITERATION_AMOUNT),self.ITERATION_AMOUNT - 1)
local FirstSample = self.PrecomputedCache["CFrames"][TranslatedIndex]
local SecondSample = self.PrecomputedCache["CFrames"][math.min(TranslatedIndex + 1,self.ITERATION_AMOUNT - 1)]
local Progress = (T - math.clamp(FirstSample[2], 0, T)) / (SecondSample[2] - FirstSample[2])
if Progress~=Progress then Progress = 1 end
return FirstSample[1]:Lerp(SecondSample[1],Progress)
end
remplace CalculateUniformCFrame with this one!! (you can do the same stuff on progress for CalculateUniformPosition)
this is a fix to this “fix” which isn’t really a fix imo
Version 1.0.9
Fixed positions jumping at the very end and removed the curve size clamp.
close to the fix, but not really. the math.clamp in the first section of the progress variable is useless and your if statement can be a bit buggy as it can give false truths due to how floats work in computers. (unless roblox has an internal thingy to compensate which im not sure)
was working for me ig, and ok
the only reason why i added clamp is so it doesn’t give -math.huge
Fixed the clamp distance function leading to really small curves
I have a question about the module. Does it support speed changes while the movement is happening? I tried setting the speed var to lets say 0 to stop the movement in place but it teleported it to the very beginning. Is there any supported way of changing the speed ?
Yes, You just need to store your T value in the enemy and update it everytime you change the enemies position.
How would the “updating” look? Would you have to recalculate the T value or?
--in the loop that updates enemies TValue
Enemy.TValue += calculations
Enemy.SpawnTime = tick()
the calculations is just TimePassed / TotalpathTime.
heres a pseudocode example.
--outside loop
local Speed = 5
local StartTime = tick()
local Enemy = {}
local PathObject = bezierpath.new(args)
--in loop
Enemy.AlphaValue += (tick() - StartTime) / (PathObject:GetPathLength() / Speed)
StartTime = tick()
if you want it to be a bit more optimized you could save the alpha value when an enemies speed changes and only cange the AlphaValue variable and StartTime variable when their speed is changed. but this just makes it a bit easier to handle changing speed IMO.
As per request by a couple of people ive added BezierPath to wally!
BezierPath = "omrezkeypie/bezierpath@1.0.11"
Is it possible to open source the game?
VERSION 1.1.0
Added 2 new functions:
CalculateDerivative
CalculateClosestPoint
more info in the github
w skibidi rizz very valid +1 sigma respect keep it up mr. sigmakeychain
where was this away from me , thanks omrez for this cool module