Part used in custom sizing system not going through terrain even though cancollide is false?


#1

Hey there,
I am currently making a plugin, and I use a part to determine the selected area, however, when sizing the part it wont go through terrain. This plugins main purpose is to be able to select through terrain.

Here is what happens:

Here is a sliver of code that controls this:

elseif face == Enum.NormalId.Bottom then
local newDis 
if snap then
newDis = math.ceil(distance)
else
newDis = distance
end
newPos = origPos - Vector3.new(0, newDis/2, 0)
newSize = origSize + Vector3.new(0, newDis, 0)					
p2.Position = origPos - Vector3.new(0, newDis/2, 0)
p2.Size = newSize

#2

Instead of setting the position, try cframe

p2.CFrame = CFrame.new(origPos) *CFrame.new(0,newDis/2,0)

EDIT - Just noticed that you are setting the size after setting the position, this will move the part on top of another regardless of collision


#3

Thank you!