Easy Camera Distortion and Manipulation (GONE WRONG) **Professional edition** CUSTOM SHIFTLOCK NEW || Roblox Roblox Studio

šŸ”„ Easy Camera Distortion and Manipulation (GONE WRONG) šŸ„µšŸ„µ **Professional edition**āš”šŸ•µļøāš”

Want to make epic effects for your game? Want to amplify camera shake? Want to make parents cry after their child has been spotted breakdancing on the floor after playing your game?

Well this is the tutorial for you!

Using CFrame black magic you can create Camera Offsets like a custom shiftlock super ez! You and also uhhh like squish and stretch camera like in this video below! And many many more possibilities!!!

OMGMG SLENDERMAN VIDEO!! << YT link not IP grabber I swear!! :scream:

image

The MAGIC FORMULA

All you have to do is create the MAGIC FORMULA:

CFrame.new(X, Y, Z, R00, R01, R02, R10, R101, R12, R20, R21, R22)

And then simply change each component to the way you desire as listed below

X, Y, Z - Camera Position Offset (SUPER GOOD FOR MAKING CUSTOM SHIFTLOCK!!!)

R00 - Right Side and Left Side squish (For Default Camera = 1)
R01 - Up & down tilt
R02 - Volatile movement? Lmao I donā€™t know

R10 - Right & Left tilt
R11 - Top side and Back side squish (Default = 1)
R12 - Volatile movement?

R20 - Rotates camera left and right
R21 - Rotates camera up and down
R22 - Offbrand FOV changer (Default = 1. This kinda creates a similar effect to changing the FOV when you lower it closer to 0. Seizure warning for negative values!!)

Warning!!! - R20, R20, and R20 are super goofy and can cause very weird movement and camera effects :flushed:
(Check the comments of this post for an example where it infects your monitor with the venom symbiote) :smirk:

Also Note: I am pretty sure R00 to R22 cannot exceed a value of 1 :frowning: maybe it can with some experimentation but thatā€™s youā€™re problem


If youā€™re lazy and just want to apply this to robloxā€™s default camera (which 99% of non sociopaths will)
Then all you have to do is to just multiply the MAGIC FORMULA with your current Cameraā€™s CFrame every renderstep

This code below if put in a local script inside like something like uh StarterCharacter then it would apply the MAGIC FORMULAā€™s power on the Cameraā€™s CFrame

local Run = game:GetService("RunService")

local Cam = game.Workspace.Camera
local MAGIC_FORMULA = CFrame.new(X, Y, Z, R00, R01, R02, R10, R101, R12, R20, R21, R22)

Run.RenderStepped:Connect(function()
	Cam.CFrame = Cam.CFrame * MAGICFORMULA
end)

If you want an explanation on why this works, I have no clue :skull:

But this very cool person, @BurningEuphoria has a clue and explained (using their 4021321032013021301 IQ brain) how it probably works

Burning also credits a ā€˜3blue1brownā€™ for their knowledge on what Iā€™ll assume is the CFrame Matrix confolujunction idk I donā€™t speak math

image

Oh yeah Burning also linked this vid
image

Too lazy to copy link so youā€™re gonna have to type it manually on your own

Edit: Some more info from Burning :scream: (NO WAY!)

If you want to know where I stole all this info from, I got it from clonetooperā€™s game below yes yes :sunglasses:

Also credits to all those othe rdev formumc posisc that like um reditected my research back to this game :+1::+1::+1::+1::+1::+1::+1::+1:

ā€“ uwu

178 Likes

ALRIGHTY THEN

So where do we put the script, and is it a LocalScript or script

Tldr, thats a lot of stuff

9 Likes

You can use the Magic Formula in any way

Here is a simple example in-game using a modified version of the script in the article above

The code above is put in a local script under StarterCharacterScripts and accurately emulates the average CSGO twitch streamerā€™s gameplay

And all I did was reduce the ā€œR11ā€ component of the formula (which is the one responsible for squishing the top and bottom of the screen, which in turn, makes the gameplay wider

image

Hope this helps!! c:

25 Likes

Dying from laughter, thank you so much.

22 Likes

this was by far the best thing ive read on this site
thank you for spreading the word about this cool thing

11 Likes

when the meme post is actually comedic
touche sire

19 Likes

You made my day in every way we need more posts like these and the best part is that I learned something.

Iā€™m a sociopath

100% confirm that is blackmagic

jokes aside I hope the mods dont remove this gem they cant because this sooo useful I learned soo much. and @BurningEuphoria U are my new role model

also heres the 3blue1brown tutorial Vectors | Chapter 1, Essence of linear algebra - YouTube you explained this so well. I have delighted with the best review of vector magic

4 Likes

This is the most scientific article Iā€™ve ever read. So much information. I feel like my brain doubled in size. Thank you for this masterpiece.

ā€¦Also pls help, how to unskew my vison? I canā€™t walk straight help

2 Likes

Finally, I can fully recreate CSGO in roblox

I have all the tools I need, including thisā€¦

3 Likes

Post goes crazy!! very informative :revolving_hearts: :heart_eyes_cat: :hot_face: :hot_face: :fire: :fire: :fire:

4 Likes

i love the humour in this post

thank you

3 Likes

You have to multiply the camera by the inverse of the last coordinate space to work properly.

2 Likes

Put simply, a basic CFrame operation.

Just use a script to return the MAGIC FORMULA to the default:

CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) < This is returns the Camera back to itā€™s default CFrame

local UIS = game:GetService("UserInputService")
local Run = game:GetService("RunService")

local Cam = game.Workspace.Camera
local Squish = 0.5

Run.RenderStepped:Connect(function()
	local MAGIC_FORMULA = CFrame.new(0, 0, 0, 1, 0, 0, 0, Squish, 0, 0, 0, 1)
	Cam.CFrame = Cam.CFrame * MAGIC_FORMULA
end)

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.E then
		if Squish == 0.5 then
			Squish = 1
		else
			Squish = 0.5
		end
	end
end)

This script above lets you toggle a squish effect for the camera by pressing E

4 Likes

what a pro scripter also I have a question does editing The matrix Cframe of a part work? or does editing the cframe matrices of a camera have the matrices only use?

Sorry Iā€™m a bit confused by what you mean

Just in case youā€™re talking about R20, R21, and R22, those donā€™t have to be multiplied by the inverse even though itā€™s negative LookVector

A positive R20 turns the camera right and negative to the left
R21 to the right and when itā€™s negative it turns to the left
and R22 when it itā€™s positive moves the closer to the character the closer it is to 0 (pretty much changes FOV) but once it goes negative, it starts flashing and giving your screen a seizure and can kill the character

Even if thatā€™s not what you were talking about, this brought light on the glitchiness of R20, R21, and R22

Like this is literally what happens when I put a negative R20 :skull:
Gonna update the page to make the info more accurate

4 Likes

I am 99% sure you can modify the matrix of a part but you have to be super accurate with your inputs unlike with camera CFrame where you can seemingly modify each component to their on values even if they violate how itā€™s supposed to work normally

Here is an example of what happens if you donā€™t put it accurately. It just ends up causing the part to noclip into the backrooms.

Itā€™s very odd tho because itā€™s still there (as shown by the little blue dot; donā€™t mind the box around itā€™s part of the character)

And you can easily snap it back to reality by putting itā€™s CFrame to something that is valid

Now, there might be some undiscovered or very obscure thing that can occur when you tingle with a partā€™s CFrame like how it can affect the Camera. But rn there donā€™t seem to be any and probably isnā€™t any (There might be! Or might not!)

Imo, it is best to not mess around with manipulating the matrix of a partā€™s CFrame as there are much easier ways to change position and rotation like pretty much everything on the new roblox documentation thingimajiggy


Though I hate how it takes so long to scroll through because of the layout so if you prefer (which I prefer too) just use the old developer page :heart_eyes::heart_eyes::heart_eyes:

https://developer.roblox.com/en-us/api-reference/datatype/CFrame

I do miss it too

can confirm this happened when testing

so these is basically no use to the Matrix unless its for cameras? okie
also U should do more specil edition :hot_face: tutorials like more on Cframe. like wth is .from axis angle I know cframe magic but HOLY I cant this Cframe black magic u must teach plz :pleading_face: :point_right: :point_left:

BAHAHAHAHAHAHAHAHAHA BRO ā€“ THANK YOU SO MUCH

Cant wait to make my roblox avatar spawn as pixel

Can you make more tutorials pls??? :money_mouth_face: :moneybag: :pleading_face: :pray: :cancer:
Specifically on RayCasting :chart_with_upwards_trend:

2 Likes