I’ve been trying to “reverse” Roblox’s default humanoid auto-rotate, but I can’t figure out how. I searched in Roblox API, Roblox dev forum, and google for 2 days now, trying to find the default auto-rotate script at least so I can break it down, but I didn’t find anything.
If I’m not being clear with “reversing” Roblox auto-rotate here are some examples:
Roblox default auto-rotate
What I want to achieve, but with humanoid.MoveDirection
In this example, I basically set HumanoidRootPart CFrame to point at the camera focus.
So, you may be asking yourself, if I already made it, then why use a “reversed auto-rotate”? Well, there are two reasons:
First: when moving back to left or right the character will not point his back to it, creating this weird movement (I’m moving diagonally in the video):
Video
Second: as shown in the first video on this topic, the Roblox default auto-rotate creates a little delay for the character to point to move direction, a kind of cool effect. I know it could be done with CFrame manipulation but that’s not the point here.
Roblox auto-rotate but when going backward (What I want to reverse)
So, is there any way to create a “reversed auto-rotate”, like, instead of pointing the character’s front to walking direction, pointing his back? How would I do this?
If I’m not being clear or you need some kind of information about the problem let me know.
Anyways, I didn’t find any weld on the root part or connected to it, if you meant motor6D then there are two main problems:
I don’t know how to rotate a motor6d properly
If I rotate it by 90 degrees the character will point his back to move direction only when going forward, I’m trying to achieve something like the second video in the topic, but with moving direction so that I don’t need to create whole new animations for back left and back right.
(I already made animations for the back left and right but they were basically the back
walking one I made but rotated 45 and -45 degrees, and when mixing them together they look pretty weird.
So, because they are all the same animation I just wanted to automatize the process and make it look better just by creating this “reversed” auto-rotate.)
unsure of whether this will help, but in player.Character.Humanoid there is a property called auto-rotate, it can be set to true (where, unless shiftlocked, character will face the direction hes moving) or false (i tested this, the character will face the same way he was facing before you turned auto-rotate off. this applies to zooming in and rotating camera, and i believe shiftlock)
also perhaps try rotating the humanoid root part by 180 degrees along the up-down (y) axis?
I believe its so they can take advantage of the 240 hz physics engine.
Otherwise I recommend scripting your own to reverse it. Here is mine look at the AutoRotate module script which uses align orientation in the CFrame.loolkAt towards the move direction. You probably can just add a negative sign to reverse it:
local moveDir = root.CFrame:vectorToObjectSpace(humanoid.MoveDirection)
if moveDir.Magnitude > 0 then
alignmentAttachment.CFrame = CFrame.lookAt(Vector3.new(0,0,0), moveDir)
alignOrientation.Enabled = true
end