Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I manipulate a camera to make a 2D point of view and then make street fighter like movement?

Asked by 1 year ago

I tried to make a 2D camera, something like street fighters and it wasn't very successful. first of all the camera didn't work properly and second, when the player moved from right to the left, he would do a little turn before looking behind (I want the player to move back while still looking forward. How can I make that? I don't want someone to make me a script, I just want someone to explain to me what I should use and what I should learn to start making that.

1 answer

Log in to vote
0
Answered by
wwedffy 17
1 year ago

About the movement make a script and manipulate the controls by disabling/changing the controls to have an effective movement

So for the 2D point of view: make a 2D camera put this in a local script inside StarterCharacterScripts

local cam = workspace.CurrentCamera

local char = script.Parent
local hrp = char:WaitForChild("HumanoidRootPart")


local cas = game:GetService("ContextActionService")

cas:UnbindAction("moveForwardAction")
cas:UnbindAction("moveBackwardAction")


game:GetService("RunService").RenderStepped:Connect(function()

    cam.CameraType = Enum.CameraType.Scriptable

    cam.CFrame = cam.CFrame:Lerp(CFrame.new(hrp.Position + Vector3.new(0, 5, 10), hrp.Position), 0.1)
end)

The only think i don't know is how to make the character moving back while still looking in the front. But i hope i helped you with the other answers :)

0
Thanks a lot, I would appreciate if you could find someone to help with the backward moving thing, but thanks for everything else! Raven_fortnite3 2 — 1y
Ad

Answer this question