mirror of
https://github.com/Sevii77/proper_clipping.git
synced 2025-03-04 03:13:04 -05:00
readd timer when reapplying constraints, fixes #14
This commit is contained in:
parent
c6b9c42485
commit
9cb8830f07
@ -151,16 +151,18 @@ function ProperClipping.ApplyPhysObjData(physobj, physdata)
|
||||
physobj:Wake()
|
||||
end
|
||||
|
||||
for _, data in ipairs(physdata.constraints) do
|
||||
local constraint = dConstraints[data.Type]
|
||||
local args = {}
|
||||
|
||||
for i, arg in ipairs(constraint.Args) do
|
||||
args[i] = data[arg]
|
||||
timer.Simple(0, function()
|
||||
for _, data in ipairs(physdata.constraints) do
|
||||
local constraint = dConstraints[data.Type]
|
||||
local args = {}
|
||||
|
||||
for i, arg in ipairs(constraint.Args) do
|
||||
args[i] = data[arg]
|
||||
end
|
||||
|
||||
constraint.Func(unpack(args)) -- Forcing constraints to create themselves again
|
||||
end
|
||||
|
||||
constraint.Func(unpack(args)) -- Forcing constraints to create themselves again
|
||||
end
|
||||
end)
|
||||
else
|
||||
physobj:EnableMotion(false)
|
||||
physobj:Sleep()
|
||||
|
Loading…
Reference in New Issue
Block a user