Lite Actions - Plugins

LiteActions

We make free plugins that will help your developer journey, these plugins are lite and easy to run, just a button and a dream.

Camera Model Orientation

Download now (11) Camera Model Orientation - Roblox :grinning:

Camera Model Orientation is a plugin that creates a Camera Model that can be used to create menus and more. As of now it’s only a model and you will need to add your own code.

We just added two custom functions that you can use to interact with the cameras.

SetAsCurrentCamera() – Local Function (Cannot be used with Server Scripts)
ResetCamera() – Local Function (Cannot be used with Server Scripts)

in order to access this functions Require the module script inside the camera.

Script example:

local userInput = game:GetService('UserInputService')
local cameraModel = workspace.CameraModel
local cameraFunctions = require(cameraModel.CameraFunctions)

local active = false

userInput.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		if not active then
			active = true
			cameraFunctions.SetAsCurrentCamera()
		else
			active = false
			cameraFunctions.ResetCamera()
		end
	end
end)

huh thx. so now i can do something with the camera model

This is a neat idea, but there are already better options out there

That works with the Games’s current camera, only adds functions and logic to it.

Our system works with creating multiple 3D cameras around the game, each one of them containing logic.

Think of it as a new Object.

Try out the plugin and you will understand!

I only assumed it interacted with the normal camera because the example code you provided is extremely vague on the practical functionality of the model.

That code can be used to switch the current camera to the one you created via the plugin. This is usefull to create fast cutscenes or point the camera to a precise direction.

And you can choose the direction by pointing with the Studio Camera and pressing the Add New Camera button. It will add a camera to the current camera Position. This helps with getting the right angle and orientation.

local CameraFunctions = {}

local cameraModel = script.Parent
local CurrentCamera = workspace.CurrentCamera
local plr = game.Players.LocalPlayer

CameraFunctions.SetAsCurrentCamera = function() -- Client function, can only be run via clients or local scripts.
	CurrentCamera.CFrame = cameraModel.CFrame * CFrame.Angles(0,math.rad(180),0)
	CurrentCamera.CameraType = Enum.CameraType.Scriptable
end

CameraFunctions.ResetCamera = function() -- Client function, can only be run via clients or local scripts.
	CurrentCamera.CameraSubject = plr.Character:FindFirstChild('Humanoid')
	CurrentCamera.CameraType = Enum.CameraType.Custom
end

return CameraFunctions

This is a bit of bloat for something that would be present in every camera, and I still don’t understand the point of this as you can still achieve this using CameraUtil and writing minimal code to manage the network of cameras.

I also would not be playing a tween animation without wrapping it using task.spawn

local animation = tweenService:Create(newModel, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(0.954, 1.91, 2.329)})
animation:Play()
	
history:SetWaypoint('Added new Camera Model')

This is an example video showing how the cameras can be set up and used.
Camera Orientation Plugin - Roblox Studio (gyazo.com)

I don’t need this, I have already installed the plugin and tested it out.

Your also not acknowledging that I already stated that this is possible with CameraUtil and some minimal extra code.

Sure it is, it’s also possible with nothing at all too.

But having an actual visible camera in your game keeps it easier to understand where every camera is and you can change the position of it as you like without having to change the code everytime.

This plugin it’s not supposed to replace any big modules scripts or anything, it’s called lite for a reason.

CameraUtil has a function to set the cameras position to a part, which I utilize heavily in my games, because I simply position where I want a part to be at and integrate it with my camera system. That accomplishes the same thing as “moving the camera without changing the code” because you can quite literally just use the move tool on the camera part.

Using that method is even more lightweight than this plugin, because it doesn’t tween, doesn’t cause extra computing power from the mesh, and doesn’t get held up by a tween. All you need is a single anchored part and you can just call 1 function on the module. With this though, you have to require each seperate module from each individual camera, which is very inefficient.

Again,
What’s faster? in terms of setting everything up and actually using it.

Considering I can just call a single function over having to install a plugin, position my camera, and write some code to require a bunch of different modules, I’d rather just place a part and call 1 function, with the added benefits of camera shaking, a built in cutscene system, and a lot of functions other than just snapping the position.

Not to mention, this script is horrible for performance!

local billboard = script.Parent.BillboardGui
local mesh = script.Parent

while wait() do
	if game.Instance then
		mesh.Transparency = 1
		billboard.Enabled = false
	end
end

This doesn’t even destroy itself, so if you have multiple cameras, they all contain a script that has a constant background loop which makes the camera invisible even though it should only be called once.

On that one i can stand for.

We can fix all performance issues.