generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: 'Proximity' Fixed Camera? Is it possible?

Previous Thread :: Next Thread 
Aledriv is not online. Aledriv
Joined: 15 Dec 2007
Total Posts: 2399
30 Aug 2015 10:18 PM
As I'm still very new to scripting I was wondering if Proximity camera's are possible?

What I mean is that once a player enters a set area, the screen would switch to a fixed camera that can't move.


I have an Idea for a 2D to 3D game that I wanted to experiment with, but I need to know if this type of thing is possible, and if, easy to do?
Report Abuse
Eston is not online. Eston
Joined: 13 May 2008
Total Posts: 21591
30 Aug 2015 10:29 PM
i'm no expert, but you can't add different cameras to the game

however, you can always edit your player's camera

(use a localscript)

https://www.youtube.com/watch?v=5UFxxs9xJQY

i think the best way to do this would be to add a local script into a regular script into a brick, with the regular script having a onTouched event that causes the local script to be enabled

but instead of using a "while true do" loop, you can probably use a regular function in the localscript IF you insert a transparent screengui to avoid being able to pan your camera

to revert to the ordinary third-person camera, set CameraType to 5 or ("custom")
Report Abuse
Aledriv is not online. Aledriv
Joined: 15 Dec 2007
Total Posts: 2399
31 Aug 2015 12:55 AM
That video didn't really help...

I'm currently going through hundreds of open source scripts, and recreating them myself to help teach me. I'm hands on learner, not observing.

I also wanted to actually set up a camera so when a player hits the invisible non collidable brick, the players camera would pan to pre set area and angle.

However, all Iv been able to produce is a fixed 2D camera that follow's the players normal camera, and I can't make it do what I want...
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
31 Aug 2015 01:19 AM
You don't mean like cinematic, right? Like a shot from a corner while you walk across the room? Or do you?
Report Abuse
Aledriv is not online. Aledriv
Joined: 15 Dec 2007
Total Posts: 2399
31 Aug 2015 02:11 AM
Not really, I want the Camera to be in a fixed, unmovable position. And when the character hits a special brick that will be non collidable, the Camera will pan over to a new location smoothly and lock itself in place again.

In a way it could be cinematic, but I don't see it that way.

The way I'm thinking of designing the game is for it to be very interactive, meaning buttons that make a path open and stuff :D
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
31 Aug 2015 02:26 AM
Maybe CFrame:lerp() for the CoordinateFrame propety? I could've sworn there was a special function for it like TweenPosition for GUIs
Report Abuse
Aledriv is not online. Aledriv
Joined: 15 Dec 2007
Total Posts: 2399
31 Aug 2015 02:38 AM
You may tell me what helps and what does not, however I do not understand at all how to write a script...


All Iv ever been able to do is, depending on the script, edit. Some scripts that are shortish, I can do heavy editing, but the bigger, more complex scripts I have issues with.


Most likely I'm going to have to ask someone to do one for me, with instructions on how to change the camera's location each time. Luckily this thread has a few people who do this easier stuff for free, and don't charge such ridiculous prices like most people.


Literally a few weeks ago I asked help on something, and everyone tried to make me pay upwards of 5000 Robux (That was the lowest actually). However, after a few hours of waiting around a nice dude came in and showed me how to actually do it, (The script was only 10 lines, and I didn't know why it never worked) he added a single word and the script then worked.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
31 Aug 2015 02:41 AM
Code is perfectionist. If it isn't told exactly what to do, it will try doing whatever it is you actually did and may find an error and fail.

It's like how I can't freaking compare nil and a number using if statements. What's up with that??

x=nil
y=1
if x==y then print("This is just gonna error...stupid logic[al operators].") end
Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
31 Aug 2015 03:26 AM
make it fixed:

workspace.CurrentCamera.CameraType = "Scriptable"


To move it:

workspace.CurrentCamera:Interpolate(StartingCFrame, EndingCFrame, timeittakestotween)


Cameratype must be set to scriptable in order for Interpolate to work.
to access CurrentCamera in must be in a localscript.
Report Abuse
ElevateYourMind is not online. ElevateYourMind
Joined: 07 Dec 2014
Total Posts: 242
31 Aug 2015 03:29 AM
http://wiki.roblox.com/index.php?title=CameraSubject

Test around with Camera Subject
Report Abuse
Aledriv is not online. Aledriv
Joined: 15 Dec 2007
Total Posts: 2399
31 Aug 2015 10:43 AM
So this is the script so far, Iv been looking at what works in open source, and this is all I can manage to do, its in StarterGui:

game.StarterGui:SetCoreGuiEnabled(4, false)
local currentZoom = 20
local currentX = 0
local currentY = 0
game.Workspace.CurrentCamera.CameraType = "Scriptable"

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

if script.Parent.Parent.Character:findFirstChild("Head") then
game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(script.Parent.Parent.Character.Head.Position + Vector3.new(currentX, currentY, currentZoom))

if currentZoom > script.Parent.newZoom.Value then
currentZoom = currentZoom - 1
elseif currentZoom < script.Parent.newZoom.Value then
currentZoom = currentZoom + 1
end

if currentX > script.Parent.newX.Value then
currentX = currentX - 1
elseif currentX < script.Parent.newX.Value then
currentX = currentX + 1
end

if currentY > script.Parent.newY.Value then
currentY = currentY - 1
elseif currentY < script.Parent.newY.Value then
currentY = currentY + 1
end
end
end)

There are also Values above this script in the starter Gui:
newY (0)
newX (0)
newZoom (40)


I'm thinking I would need to use a touch interest or something, however this camera follows the player instead of being fixed :l
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image