I’m currently adding blood spots to my game.
I need to weld decals to a part, but I don’t want to use WeldConstraint, instead I prefer the regular Weld (I’m doing everything in a hard way).
I can calculate the position of C1 without issues, but when it comes to calculating lookvector I can’t figure out how to.
local ins = result.Instance
local pos = result.Position
local normal = result.Normal
local bloodClone = blood:Clone()
bloodClone.Parent = ins
local weld = Instance.new("Weld")
weld.Part0 = ins
weld.Part1 = bloodClone
weld.C1 = CFrame.new(ins.CFrame.Position - pos, (ins.CFrame.Position - pos) + lookcalc)
weld.Parent = bloodClone
debris:AddItem(bloodClone, 5)
Here is a part of my code, I need to put real calculations of lookvector instead of lookcalc.
Oh sorry. Normally you would just subtract the vector from the other vector but I’m not too sure how you would approach this with cframes. You’re correct with the first part of the calculation but you’ve got to keep the angle the whole way through.
This just finds the offset from the centrepoint of the instance (ins.Position) and then adds it to the cframe of the actual instance. This allows rotation to also be put into account when.
If this doesn’t work try assigning it to weld.C0 instead
CFrame confuses me sometimes