I can create an orbit within a flat plane, that shouldn't be too much of a problem since all I really need to do is use the parametric equation for a circle/oval and position the orbiting part accordingly, like so:
while wait() do local t = tick() * 2 * math.pi * X -- X is the time of orbit local o = Vector3.new(math.cos(t), 0, math.cos(t)) -- or any combination of the two part.CFrame = CFrame.new(mainPart.Position + o * R -- R is the separation end
How would I create a circular orbit out of the plane?
while wait() do local t = tick() * 2 * math.pi * X local tilt = math.rad(15) local o = Vector3.new(math.cos(t), math.cos(t) * math.sin(tilt), math.cos(t)) part.CFrame = CFrame.new(mainPart.Position + o * R) end
This was the best I could come up with. But since I lack the knowledge about orbits and such I think this might simply not work. If you provide more context I might be able to figure it out.