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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 03 Apr 2013 10:32 PM |
^^^^^^^^^^^^^
~I am the Bill Gates of conning, don't sell a calculator to Bill Gates~ |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|