Rotating an Accessory Around Its Axis Instead of Its Attachment Point

I’m trying to make a character customization system that allows players to manipulate their accessories. I can’t figure out how to properly do the rotation part of it without the ArcHandles adornment going crazy, or not following the mouse when its being dragged. I also want to know if it’s possible to rotate it around its own axis instead of the attachment point. If this is not possible, then I just want the Axis adornment to follow the mouse when dragged.

I’ve been trying to figure this out for the past couple of hours, but I can’t wrap my head around it. I read over similar posts but none of them work for me. I suck at CFrames, so if anyone could help me figure this out, it’d be greatly appreciated!

elseif adornment:IsA("ArcHandles") then --TODO: figure out how to fix this monkey business
			print("AXIS:"..tostring(param1), "RELATIVE ANGLE:"..tostring(param2), "DELTA RADIUS:"..tostring(param3))
			
			if param1 == Enum.Axis.X then
				newRotation = weldCFrame*CFrame.Angles(param2, 0, 0)
			elseif param1 == Enum.Axis.Y then
				newRotation = weldCFrame*CFrame.Angles(0,param2, 0)
			elseif param1 == Enum.Axis.Z then
				newRotation = weldCFrame*CFrame.Angles(0, 0, param2)
			end
			
			adornment.Adornee.AccessoryWeld.C0 = newRotation
		end
	end

1 Like

This first is related but I believe the formula is not on point, try checking out my second which has my CFrame tutorial and many CFrame examples.

3 Likes

I appreciate the links, this looks like what I need. I’ll look through it tomorrow and mark this as a solution if it works out. :grin:

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