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: Camera:Interpolate broken?

Previous Thread :: Next Thread 
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 07:52 AM
I've been using an interpolation function of the camera for a while now, and it isnt until i tested in online mode have I realised that the interpolate doesn't aim at the focus, or anything like that. It sets the coordinate frame properly, but it just aims straight the whole time. Any help?

function docamera(Board)
local turn = Board.CFrame * CFrame.Angles(0, angle, 0) * CFrame.new(0, 10+hangle2, 10)
cam:Interpolate(turn, Board.CFrame*CFrame.new(0, 0, -20), 0.2)
end

This works perfectly fine in solo mode and tracks the board.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
21 Aug 2015 07:59 AM
Set the camera type to Scriptable
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 08:00 AM
That is done beforehand. This function only sets the coordinates.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
21 Aug 2015 08:01 AM
It broke my game too :(

I hope they fix it soon.
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 08:03 AM
Oh. It's probably an update then. Darn... And it works so well in solo mode too. I hope this bug doesn't happen again.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
21 Aug 2015 08:05 AM
Looks like I gotta make my own interpolate now so I won't have to worry about this again, lol.
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 08:12 AM
Ugh, its going to be a pain to do that.

I'll do it tomorrow. That's such an unneeded hassle.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
21 Aug 2015 12:13 PM
How is it a pain?

function InterpolateCamera(cam, begin, end, time)
for i = 1, 100 do
cam.CoordinateFrame = begin:lerp(end, i/100)
wait(time/100)
end
end


Of course that has a problem if you try to wait too little, but noneoftheless it works
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 04:17 PM
Meh, more because I didn't know how to do it at the time. Thanks for putting it there.
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
21 Aug 2015 04:55 PM
And now i have the problem where it is shaky when tracking. Ugh. :/
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
22 Aug 2015 01:07 AM
Is it still broken?
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
22 Aug 2015 01:26 AM
local function Interpolate(newpos,apa)
local cam=workspace.currentCamera;
local repz=apa*90;
for i=1,repz do
cam.CoordinateFrame=cam.CoordinateFrame:lerp(newpos,i/repz));
wait(1/60);
end;
end;

might be wrong in ur case
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
23 Aug 2015 04:15 AM
No, that won't work. First off, Rbx.Lua runs at a maximum of 30 fps. wait(0.001)ing will return 0.03799724612326 so it will lock it at 30 fps on a script (online, I know you can increase fps in testing).

Thanks for the suggestion though.
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
23 Aug 2015 04:16 AM
Camera:Interpolate runs a translation at 60 fps, which means theres no jitter. There's an intermediary function I've created but its not for this purpose.
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
23 Aug 2015 04:17 AM
RenderStepped
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
23 Aug 2015 04:18 AM
"maximum of 30 fps"

no

60fps from runservice or something

Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
23 Aug 2015 04:21 AM
That's actually cool. I'm surprised they havent made a post about that. Thanks.
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