improved-stacker icon indicating copy to clipboard operation
improved-stacker copied to clipboard

Add option to clone relative to prop origin

Open stepa2 opened this issue 4 years ago • 1 comments

Add option to clone relative to prop origin instead of prop bounding box

stepa2 avatar Jul 09 '21 14:07 stepa2

@stepa2

The tool already uses the prop's position as the stack origin:

	local entPos   = ent:GetPos()
	local entAng   = ent:GetAngles()
...
		-- calculate the next stacked entity's position
		entPos = entPos + (direction * distance) + offset

Direction and distance are calculated on WORLD or PROP mode. OBB Mins/Maxs are used so the prop can easily stick to the one at the previous iteration.

dvdvideo1234 avatar Sep 27 '21 11:09 dvdvideo1234