I have the following code which correctly orbits satellites where
origin is
Vector3.zero
I need help figuring out how to incline the orbit of the satellites correctly.
Any help is appreciated!
local rotation = calculateRequiredAngle(orbitDuration)
rotation = CFrame.Angles(0, 0, math.rad(rotation))
runService.Heartbeat:Connect(function()
local satPos = satellitePositions[satName]
if not satPos then
satPos = if random:NextInteger(-1, 1) == -1 then Vector3.new(-2500, 0, 0) else Vector3.new(2500, 0, 0)
satellitePositions[satName] = satPos
end
local relativePos = satPos - origin
local newRelativeCFrame = rotation * CFrame.new(relativePos)
local satCFrame = CFrame.new(origin) * newRelativeCFrame
satellitePositions[satName] = satCFrame.Position
spriteEditorEvent:FireAllClients(satellitePositions[satName], sat_attribs.Type, satName)
task.wait(0.001)
end)