In a part of my game where there are meteors falling from the sky, a lot of them. I want to make it so the angle of each meteor is different. I know how to do a simple way, but I want to make sure it is most optimized for my game’s ability to run on laptops and phones because there are so many meteors, here are my ideas (in rank of best to worst I think):
A script that uses Lookvector and velocity
Tinker around with Bodyforce and Bodyvelocity
A loop that moves the meteorite with lookvector and CFrame
If you know which one is the best or have better ideas please comment! Thank you for reading! (P.S. I really just want this to be small computer friendly!)
Thanks for the reply, I have more than ten meteorites at a time, and they are all spawned at a random position and come in waves. I don’t know if this idea would work, would it?
I think updating the CFrame in a loop is the best option, because you can keep the meteor anchored, which allows for more precise movement.
Remember to use RunService.Heartbeat so that it updates every frame (this can be used on the server).
local TweenService = game:GetService("TweenService")
local Part = workspace.Part
local Goal = { --The goal properties of the part (Position simply refers to the position of the part)
Position = Vector3.new(10, 100, 10),
Color = Color3.new(0, 0, 0)
}
local Tween = TweenService:Create(Part, TweenInfo.new(5, Enum.EasingStyle.Linear), Goal)
Tween:Play()
You can also use different EasingStyles and EasingDirections to create different effects.