Skip to content

Commit

Permalink
fix: immediate should not run if no time passed
Browse files Browse the repository at this point in the history
  • Loading branch information
littensy committed Jan 3, 2025
1 parent 6d98249 commit 62684ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/solvers/immediate.luau
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ local intermediate = require(script.Parent.Parent.utils.intermediate)
local function immediate(motionGoal: types.MotionGoal): types.MotionSolver
local goals = intermediate.to(motionGoal)

return function(key, state)
return function(key, state, deltaTime)
local goal = intermediate.index(goals, key)

if not goal then
return false
end

state.complete = true
state.value = goal
if deltaTime > 0 then
state.value = goal
state.complete = true
end
end
end

Expand Down

0 comments on commit 62684ef

Please sign in to comment.