so far I have a script that will toss a part in an arc to the position of a part called testgoal:

local t = 1
local g = Vector3.new(0,-game.Workspace.Gravity,0)
local x0 = script.Parent.CFrame * Vector3.new(0,2,-2)

local v0 = (game.Workspace.TestGoal.Position - x0 - 0.5 * g * t * t)/t


script.Parent.Velocity = v0

this is fine but I modeled a mortar shell and simply tossing it wont be enough, I need it to not only travel in an arc to a certain point but I want it to always be oriented along its arc path as it travels like a real mortar shell.

how could I do this with the current formula?

4 comments

0

Why do you need to use bodyvelocity?

0

its standard for most of my projectiles as its smooth and constant.

0

I would just use for i=0, var, var do

0

Why not just lerp a CFrame? It's so much easier and gives better results.