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 » Scripting Helpers
Home Search
 

Re: Camera causing lag

Previous Thread :: Next Thread 
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2013 08:12 PM
Recently, we developed a ball that you control, it can jump as well as go up to 150 speed. This ball works perfectly, except for 1 small bug.

When we make the camera follow the ball, lag comes.
When we are out of the camera, there is no lag. We tried several camera modes, some lagged more than others. The one we want the most is track because it is easy to zoom (since you turn with right click) but it is very laggy.

It doesn't lag when you are going slow or if no one else is around; it never lags on play solo mode.

You can see the problem at the game here: http://www.roblox.com/--place?id=102529503
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2013 08:12 PM
Hold "SHIFT" and click "S" to skip the loading.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2013 08:19 PM
Ohh, more information:

The ball moves with a BodyForce (lookVector of Camera)
The ball jumps with Velocity (Ball.Velocity + Vector3[y])
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2013 09:35 PM
Bump.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
03 Apr 2013 09:40 PM
This is a huge issue that I've been complaining about for a long time. This is due to the poor synchronization between scripts and the actual game updating and drawing itself. Because it's not synced, the values you input to the camera sometimes are a bit behind, therefore making it appear as if the camera is jerking around like crazy.

Currently there really isn't any solution. If you're going to fully lock the camera to a moving object, you need to either make it move slowly, OR you need to set that object's CFrame directly as well, at the same time you do with the camera's.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2013 09:52 PM
So make the camera type scriptable and do it from that?
Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
03 Apr 2013 10:25 PM
Crazyman, I have one question for you. If the camera tracing an object causes lag, then why do you not lag as much when it traces the assigned player? Why does it only lag when following a Part? That has been confusing me as well, but I do not know why this like this. You probably do not know the answer, but then again, you may as well do.
Report Abuse
RTCMaaznager is not online. RTCMaaznager
Joined: 16 Oct 2011
Total Posts: 3809
03 Apr 2013 10:32 PM
^^^^^^^^^^^^^

~I am the Bill Gates of conning, don't sell a calculator to Bill Gates~
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Apr 2013 02:09 AM
Would you do (something like this, I'll find out later)
Like:

while wait(0) do
camera.CFrame = ball.CFrame
end

or something?
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
04 Apr 2013 02:34 PM
Robloxianpilot, because that functionality is handled within a loop that is probably synced with the updater of the game internally.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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