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: You know crazyman32's stranded?

Previous Thread :: Next Thread 
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
29 Nov 2011 08:22 AM
[ Content Deleted ]
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
29 Nov 2011 08:44 AM
[ Content Deleted ]
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
29 Nov 2011 09:16 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
29 Nov 2011 09:28 AM
This must be done from a localscript that is a descendant of the players backpack, playergui or character. You can use _____Value objects or something to send the wanted camera mode and position and stuff to the player so the script can adjust the players camera.

1.Put old cam to variable
local old=workspace.CurrentCamera
old.Parent=nil

2.Make new camera
local new=Instance.new("Camera",workspace)
workspace.CurrentCamera=new

3.Set position however you want to
new.CoordinateFrame=CFrame.new(0,10,0)

4.Set the point you want it to look at
new.Focus=CFrame.new(0,0,0)

5.Loops and stuff

6.When done set old camera back
old.Parent=workspace
workspace.CurrentCamera=old


You can use unit vectors (like CFrame.lookVector) to set the direction the camera looks at by setting it as the focus and you gotta add camera position to it (convert to cframe first tho like cam.Focus=CFrame.new(look.x,look.y,look.z)+CameraPosition)

You could use that to make the camera point to the same direction as your head, or a brick that you use to control the cameras position (So you could use bodyvelocity and such)

You can also set the cameratype and set camerasubject to some part so you can just move the part to move the camera, but the user can control the camera unless you do something about it.
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
29 Nov 2011 09:36 AM
[ Content Deleted ]
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
29 Nov 2011 09:43 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
29 Nov 2011 10:27 AM
For the loops you just do like

local start=blah.Position
local end=meh.Position
local cur=0
while cur<1 do
cur=math.min(1,cur+0.01)
camerapos=start+end*cur
wait()
end

that wud interpolate from start to end. u can also add some amount in the loop or move the focus instead (so it looks to different places)
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
29 Nov 2011 10:33 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
29 Nov 2011 10:40 AM
camera.CoordinateFrame = CFrame.new(start+endp*cur)


note that that code interpolates from start to end, so if the distance is big itll travel faster.

You might want to make one wich moves at a constant velocity, wich you can do somewhat ok by replacing the +0.01 part with + 3 / (start-end).magnitude*0.03 wich would make it move with velocity of 3 i think. (the 0.03 is the lenght of single frame, if you want accuracy, put the wait at the top of the loop and put what it returns in variable like local step=wait() and use step instead of 0.03)


Or you can use something way simpler like

local start=
local end=
local dist=(start-end).magnitude
local velo=5 --5 studs per sec
local dir=(end-start).unit
local cur=start
while dist>0 do
local tim=wait()
local hop=velo*tim
dist=dist-hop
cur=cur+dir*hop
campos=CFrame.new(cur) --or set camera focus
end
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
29 Nov 2011 10:55 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
29 Nov 2011 11:13 AM
camera.CoordinateFrame is a cframe.

If you want the position add .p after the "CoordinateFrame"
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
29 Nov 2011 01:54 PM
[ Content Deleted ]
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
29 Nov 2011 01:58 PM
"Scripters help each other."

if thats honestly your excuse for asking stupid questions in this forum, then you arent a scripter.

looking at the script you tried to use, it's even more obvious that you dont belong here.

go away.

@oysi: lolwut
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
29 Nov 2011 02:09 PM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
29 Nov 2011 02:20 PM
@Oyusi

Is there intended hidden message in chur text or is it just my imagination? o.o
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
29 Nov 2011 02:26 PM
@Oysi: Plus du pomme de terre svp. Aux pays-bas on mange beaucoup du pomme de terre.

~Myrco; Music lover, nederlands/dutch and a scripter
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
29 Nov 2011 02:36 PM
@themyrco: im in french 2, and i think you said something about eating potatoes? D:
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
29 Nov 2011 02:40 PM
Oui.
In holland we eat much potatoes (talking 'bout da real dutchies), like everyday, unless we do it easy and take some drive-in food like chinese or so. But most likely it is:

-Potatoes
-Meat
-Any kind of vegetable.

Eventually we cook different recipies, like uhmm well any kind. From Africa to China, we make any recipe if we eat something different.

~Myrco; Music lover, nederlands/dutch and a scripter
Report Abuse
kaboom1 is not online. kaboom1
Joined: 13 Nov 2008
Total Posts: 363
30 Nov 2011 06:42 AM
TheMyrco,
You made this guy sad D:
http://www.roblox.com/User.aspx?ID=21975884
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
30 Nov 2011 07:57 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
30 Nov 2011 09:00 AM
Umm...

You should make some functions that control the camera, given:

1.Where its looking at

2.What direction its looking towards

3.How far from the point where its looking at it is


Then you get the cameras position by doing something liek

LookingAt + LookDirection * Zoom


Idk what you mean tho... Is the camera attached to your head or what?
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
30 Nov 2011 01:36 PM
I'd say crazyman used Lerps and Camera Focus and Coordinate frame loops.

Pretty simple, if you are capable of writing long scripts, and not get bored.
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
30 Nov 2011 06:07 PM
Look at the account 'Blewm'; he has a pretty good example of it
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