Rotating Object at a Fixed Axis

  1. What do you want to achieve?
    I want to be able to rotate a part at a fixed axis

  2. What is the issue?
    I am unsure how to approach this solution. I have only been able to rotate relative to the part’s axis

  3. What solutions have you tried so far?
    I have tried multiplying Angles to the current CFrame and tried switching it around, but it seems to rotate in the wrong direction/not how it’s supposed to rotate.

-- rotates downward of axis
-- This is a sample of what rotating one axis look like. There is left, right, up, down.
table.insert(LadderEventConnections, LadderGui.MainFrame.LowerButton.MouseButton1Down:Connect(function()
	ConnectionInterrupt = false

	while ConnectionInterrupt == false do
		print("Running")
		LadderStart.AlignOrientation.CFrame = LadderStart.AlignOrientation.CFrame * CFrame.Angles(0, 0, math.rad(-1))
		task.wait()
	end

	ConnectionInterrupt = false
end))

What it should look like:
image
image
image
image

The Problem:
image
image

3 Likes

A piece of additional information, I am using AlignOrientation to rotate my parts, not sure if that’s vital information people should know. Here is the structure as well:

image

AlignOrientation is to make 2 Parts align to each other, not to move them.
You could use a Motor, or a HingeConstraint set to Servo to raise and lower your ladder.

1 Like

For the first car picture, is that what it’s supposed to look like as well? And are either of these examples the real example or can you show us the real example?

The first picture represents the Initial AlignOrientation where the yellow is the AlignPosition target and the green is in one attachment mode. In the second picture, it shows it rotating as if the axis is still the world’s axis. The third and fourth picture represents the rotation on the part’s axis which is the current problem of the situation.

I have figured out a solution to this problem. Essentially I reset the rotation to its initial rotation before it was raised. I then rotate the attachment and raised the rotation back to what it was originally at.

I will be taking a look at this in the future. For now, the scripts and parts I am working on are sorta deep to revise anything.

Sounds good.
If you want to see how I’ve made it work you can try out my Yeah, steampunk place.

The big airship at the top of the center island has 4 rotating turrets that are controlled using HIngeConstraints set to servo for the rotate and tilt using a VehicleSeat for the inputs.

The Observatory telescope is halfway up the island with the large platform at the top, at the end with the quadcopter. I’ve been working on it recently so it isn’t complete, but the telescope turns and elevates using Motors, and the control cranks are driven by HingeConstraints set to Motor.

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