Compass System In First Person, making it face north wont work, dead end

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to make the compass, the red tick to always face north relative to the compass orientation.

  2. What is the issue? Include screenshots / videos if possible!
    I’ve been trying to make it face north but it won’t work, Im confused since when the compass rotates, it switches rotations and if I make the red tick face north, it wont be flat on the compass.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried to take in account only the yaw for the red pointer but when the compass rotates, yaw doesnt work anymore, its either roll or pitch or a combination of both.

local last_YRotation = 0
local SP_N = Spring:create()
function TicksDirection(dt)
	local Compass = script.Parent:FindFirstChild("Item")
	local Red_Pointer = Compass:FindFirstChild("Red")
	local White_Pointer = Compass:FindFirstChild("White")
	local GoldHold_Orientation = Compass:FindFirstChild("GoldHold").Orientation
	local RX,new_YRotation,RZ = Compass.Border:GetPivot():ToOrientation()

	new_YRotation= math.deg(new_YRotation)
	local diff = (new_YRotation-last_YRotation)*1.2
	local update = SP_N:update(dt)

	Red_Pointer:PivotTo( * CFrame.fromOrientation(math.rad(GoldHold_Orientation.X),math.rad(GoldHold_Orientation.Y),math.rad(GoldHold_Orientation.Z)) * CFrame.Angles(0,math.rad(update.Y/5),0))
	--White_Pointer:PivotTo("GoldHold"):GetPivot().Position) * CFrame.Angles(0,math.rad(360),0))
	last_YRotation = new_YRotation

The GoldHold Instance is the gold cylinder in the middle, as it holds the pointers.
I’m in a dead end now, angles are very confusing

You could just add an align orientation then properly orientate the cframe to match the compasses orientation and multiply it to get the direction

Cant use align orientation im manually setting the cframes of the needles but ill try though

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