How would I make the player’s character angle itself based on the humanoid’s movedirection [e.g tilting the character slightly right when the character moves right], like in Adventure Story by vetexgames? [Adventure Story! - Roblox]
Wouldn’t using the method of keypresses make it not work with mobile players? Is there some way you can determine if they’re moving right or left with movedirection?
Would you mind detailing the CFrame/Vector version? Animations wouldn’t really work considering I’m already using custom animations that would look wonky if interrupted for a new animation that tilts.
Here’s a horrifying thing that I did to my character:
Don’t look, it will scar you
wonder how i did that?
local UIS = game:GetService("UserInputService")
local torso = script.Parent.UpperTorso
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.A then
torso.Orientation = torso.Orientation + Vector3.new(0, 0, 10)
end
end)
UIS.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.A then
torso.Orientation = torso.Orientation - Vector3.new(0, 0, 10)
end
end)
Ill get back to you when I figure it out.
Or, you can try to get a sense of what I am doing and try figuring it out.
Funny how I forget it when it’s most relevant. I believe the proper term for this is character momentum and that there’s a resource somewhere that allows you to do this. Don’t do it with animations because they’ll override other ones or get countermanded. It has to do with lerping some of the joints relative to the direction of movement. Can’t recall at all what it is.
There’s this recent post on what seems to be the same topic: