Beam Mesh not Working Properly [RESOLVED]

Hello! I have come across an issue that has left me stumped. This issue is trying to get the cylinder mesh not to look so deformed if this makes any sense, here is an example of what it is doing:
image
My goal is to have it be a straight cylinder essentially, I have tried many different ways but none of them seem to work. I have also checked around dev forum and either I am not using the right keywords or I just can’t find it. Here is the chunk of code where all of this is done:

		else
			local CenterPosition = (hitPart.Position + Tool.Handle.OpenBarrel.Tip.Position)/2
			local throwerTip = Tool.Handle.OpenBarrel.Tip
			streamEffect.CFrame = CFrame.lookAt(CenterPosition, hitPart.Position, Vector3.yAxis) * CFrame.Angles(0, math.rad(90),0)
			streamEffect.Startpoint.WorldCFrame = CFrame.new(throwerTip.Position)
			streamEffect.Startpoint.Orientation = streamEffect.Segment2.Orientation
			hitPart.Position = MousePos
			if ((hitPart.Position - MousePos).magnitude) > 100 then
				hitPart.Position = MousePos
			end

If you’re curious on why I am using bones it is because in the end I am going to be doing a tweening/wavy effect, but first I am trying to figure out how to get it straight looking.

Any help that points me in the right direction will be greatly appreciated!

Is my understanding correct that you need the beam to go straight from the throwerTip?

1 Like

Basically, when I am repositioning the bone to the thrower tip, it ends up messing up the whole mesh even though the orientation and position is all correct.

Ended up figuring it out and I feel quite stupid lol, I just ended up making the bone aka Startpoint’s WorldPosition equal the Thrower Tip position rather than using the WorldCFrame.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.