Hello. To make this very short and simple basically.
I need help with some vector math. How could i possibly cast a ray that originates from a LookVector(Multiplied by 100) and then point downwards(Also multiplied by 100)
This was the best way i could possibly describe what i need help with. If you didnt get it. I have some pics to hopefully give you a better picture of what i need help with.
Currently this is how my formula draws the ray. Not what i want.
local Cast = require(workspace.CastVisuals).new(Color3.new(0, 0.666667, 1),workspace)
-- Prototype code
while true do
local Dir1 = script.Parent.CFrame.LookVector*100
local Dir2 = -script.Parent.CFrame.UpVector*100
local Final = Dir1+Dir2
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {workspace.A,workspace.B}
Params.FilterType = Enum.RaycastFilterType.Exclude
local Hit = Cast:Raycast(script.Parent.Position,Final,Params)
if Hit then
workspace.B.Position = Hit.Position
end
task.wait()
endW
This is what i actually want.
I tried using the new AI assistant/doing research before i came here for help. But i couldnt find any topics that was related to my question or just wasnt any help at all.
Im not really a “Math guy” so if anyone could help me out thatd be really appreciated and cool.