#Custom physics problem

1 messages · Page 1 of 1 (latest)

frozen palm
#

I wanted to make my own physics module for my items, but i occured two big problems that are kinda annoying, and i don't really know how to fix them despite my efforts.

  1. the gravitatioal force somehow is slower than it should be, and it impacts very much how items fall. When i checked it on different project, with default workspace.Gravity it worked fine but on this particular one it doesnt.
  2. When i try to apply any forces in given direction and angle, objects just fly in straight line, even if forces are applied before everything. Only when i apply really small speed factor they "somehow" move downawrds but its not parabola.
#

Custom physics problem

frozen palm
#

@midnight ruin

midnight ruin
#

ok

#

you have to basically paro[baloa the x into the y with mx then upwartds scale the force into a facctor or 29

frozen palm
#

It's my first time applying physics with client synchro so uk

#

Thats the formula i've been using all the time. But in this particular project it doesnt work

--x = v₀ cos(θ) * t
    --y = v₀ sin(θ) * t - ½gt²
    
    local FixedLook = Vector3.new(self.Origin.LookVector.X, 0, self.Origin.LookVector.Z).Unit
    local xz, y = FixedLook * (math.cos(self.Angle) * self.Speed), Vector3.new(0, math.sin(self.Angle) * self.Speed, 0)

    self.Velocity = xz + y
#

Its just flies up

#

I've tried to fix it in many ways but welp

#

I think i fucked up how physics is handled

midnight ruin
#

did u understadn what i said

frozen palm
#

Not really