local mag1 = player:DistanceFromCharacter(pos)
local mag2 = (pos - otherPos).Magnitude
What would be the main Difference Between these two?
local mag1 = player:DistanceFromCharacter(pos)
local mag2 = (pos - otherPos).Magnitude
What would be the main Difference Between these two?
I would say that DistanceFromCharacter
is more optimized or simpler than Magnitude
is the same but DistanceFromCharacter is based on the entire model and also has its key points
I rather go with Magnitude than DistanceFromCharacter. Magnitude gives more control over what your start & end point position will be, unlike DistanceFromCharacter forces the start point to be the head of the selected player.
DistanceFromCharacter could be optimized since it’s a engine function, but it’s just not worth it sacrificing control for a micro-optimization that barely does any good.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.