#bezier curve

1 messages · Page 1 of 1 (latest)

faint elm
#
local Humanoid = script.Parent.Humanoid
local CurrentHealth = Humanoid.Health

Humanoid.HealthChanged:Connect(function(health)
    local math_ = math.abs(CurrentHealth - health)
    if CurrentHealth > health and math_ ~= 5 then
        if math_ > 5 then
            math_ = 5
        end
    
        for i = 0, math_ do
            
        end
    end
    CurrentHealth = health
end)
``` this is a function that detects when the player takes more than *5* damage, i want a gore system with gibs that fly out of the player, hitting the ground into a puddle, instead of using roblox's physics, i have no idea how to do this, however i've heard about a "bezier" curve, could anyone explain how to use that?
vernal aurora
#

Idk man

faint elm
#

why the fuck

#

ok

inner steppe
#

you should try searching bullet drop and yoinking it for your own with raycasts if you want the blood to stick to walls so it isnt flat search up bullet hole tutorials

green barn
gritty egret
#

If you want to do it without roblox physics (not using Velocity, using default gravity, etc) then you will need to tween the gib to do a beizer curve till it hits the ground.

https://en.wikipedia.org/wiki/Bézier_curve#:~:text=A Bézier curve is defined,not lie on the curve.

You need to calculate the travel between the origin and the ground and then get a set of points in which you calculate a beizer curve, then apply the Tween for smooth travelling

A Bézier curve ( BEH-zee-ay) is a parametric curve used in computer graphics and related fields. A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approximate a real-world shape that otherwise has no mathematical representation or whose representation is unknown or too c...

faint elm
#

thank you

#

but how do i...

#

tween such a thing

#

like

#

i do the math

#

and now what

faint elm
#

please bro

green barn
#

Like it depends on what you need but you can just do tween(num, tweeninfo(<desired time>, style.Quint, direction.InOut), { Value = <desired value> })

inner steppe
#

when i tried tweening it it just reversed so if it doesnt work try increasing the points in the bezier curve and using runservice.HeartBeat to time when to move it , the more points the smoother but not so good in vast amounts