local O={}O.__index=O function O.new(m)local e=setmetatable({},O)e.Position=m e.PreviousPosition=m e.Velocity=ZERO e.Acceleration=ZERO e.PreviousDt=nil e.Anchored=false return e end function O.Step(e,O,m)e.PreviousDt=e.PreviousDt or O if not e.Anchored then e.Acceleration=Vector3.new(0,-game.Workspace.Gravity,0)e.Velocity=e.Position-e.PreviousPosition e.PreviousPosition=e.Position e.Position=(e.Position+(e.Velocity*(O/e.PreviousDt))*m)+(e.Acceleration*O)*O else e.Acceleration=ZERO e.Velocity=ZERO e.PreviousPosition=e.Position end e.PreviousDt=O end
--

local Point = {}
Point.__index = Point

function Point.new(p)
	local self = setmetatable({}, Point)

	self.Position = p
	self.PreviousPosition = p
	self.Velocity = ZERO
	self.Acceleration = ZERO
	self.PreviousDt = nil

	self.Anchored = false

	return self
end

function Point:Step(dt, damping)
	self.PreviousDt = self.PreviousDt or dt

	if not self.Anchored then
		self.Acceleration = Vector3.new(0, -game.Workspace.Gravity, 0)
		self.Velocity = self.Position - self.PreviousPosition
		self.PreviousPosition = self.Position

		self.Position = self.Position + self.Velocity * (dt / self.PreviousDt) * damping + self.Acceleration * dt * dt
	else
		self.Acceleration = ZERO
		self.Velocity = ZERO
		self.PreviousPosition = self.Position
	end

	self.PreviousDt = dt
end
