I am trying to figure out how BodyMovers are simulated in physics. A few years ago, they worked perfectly and as intended, however in recent times I’ve noticed a huge number of flinging incidents while using them.
1. I want to solve these issues that I’ve come across without having to use alternative methods, as they won’t work as I’d intend them to either.
2. As I’ve mentioned above, there have been several incidences of flinging while using them. I do not wish to seek alt methods. It works as intended with just one mover, however with multiple there seems to be nothing that prioritizes one over another, which in return causes the flinging. Intended Force Excessive Force
3. I’ve attempted to fix this by: lowering MaxForce, removing existing BodyMovers, and adjusting power/damp values.
How do I fix this?
Can changing one of their properties prioritize one over other existing forces?
I have not, I think switching to BodyVelocity would move either the opponent or yourself inconsistently. Is there a way to have one work similarly to BodyPosition?
When 2 BodyVelocity instances with infinite any MaxForce are added to the HumanoidRootPart, only the first Velocity is applied; it ignores the 2nd entirely.
demo code used in that video:
local function getModelMass(model: Model): number
local mass = 0
for _, v in ipairs(model:GetDescendants()) do
if v:IsA('BasePart') then
mass += v:GetMass()
end
end
return mass
end
local b1 = Instance.new('BodyVelocity')
b1.MaxForce = Vector3.new(0, getModelMass(script.Parent) * 255, 0)
b1.Velocity = Vector3.new(0, 15, 0)
local b2 = b1:Clone()
b2.Velocity = Vector3.new(0, -255, 0)
b2.MaxForce = Vector3.new(0, b2.MaxForce.Y * 22, 0)
b1.Parent = script.Parent.HumanoidRootPart
b2.Parent = script.Parent.HumanoidRootPart
I repeated the experiment swapping BodyPosition for the BodyVelocity; same first only force applied as the BodyVelocity.