Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Creating object forces, equation is wrong?

Asked by
noammao 294 Moderation Voter
6 years ago
Edited 6 years ago

So I want a few objects so circle the main object just like stars do.

local Part = script.Parent
local render = game:GetService("RunService")
local commet = game.Workspace.astroids
while render.RenderStepped:wait() do

    for i,v in pairs(commet:GetChildren()) do
        local magnitude = (Part.Position - v.Position).magnitude
        local F = (Part:GetMass() * v:GetMass()) / math.pow(magnitude , 2)
        v.Velocity = Vector3.new(F,F,F)
    end
end

As far as I can see my calcualation is not wrong exept for that I do not multeply my equation with G in the end.

You can see what I am trying to do in this video: https://youtu.be/Ouu3D_VHx9o
https://youtu.be/HEJ_UtSbinY

0
^ I think your youtube link is broken. Zafirua 1348 — 6y
0
Thank you. I fixed it now! noammao 294 — 6y

Answer this question