|
| 05 Jan 2013 04:22 PM |
I got bored one hour and decided to add mobile support to a vehicle. Since the seat properties are read only I used a trick that can force the property to stay in a state based on a seperate value, but its a bit tricky. It actually works perfect offline, but it stutters and glitches online.
(Expected response: http://www.roblox.com/BEAR-item?id=96866902) |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2013 04:22 PM |
Oh joy, I forgot to provide a link.
http://www.roblox.com/Mobile-Vehicle-Control-BETA-item?id=102850577 |
|
|
| Report Abuse |
|
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 05 Jan 2013 04:23 PM |
| Offline is always less-glitchey then online. |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2013 04:25 PM |
Dat lag.
[ Follow me @AbsoluteLOLness ] |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2013 04:36 PM |
Hey, is this the same thing as this I made:
http://www.roblox.com/Remote-control-set-for-VehicleSeats-item?id=54112741 |
|
|
| Report Abuse |
|
|
Merely
|
  |
| Joined: 07 Dec 2010 |
| Total Posts: 17266 |
|
|
| 05 Jan 2013 07:08 PM |
That isn't Sorcus' domain.
Talk to GongfuTiger |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2013 02:02 PM |
@Pre
I'll take a look, that might come in handy. |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 07 Jan 2013 02:41 PM |
It makes sense it would be glitchy and stutter-y online. You need to get input locally from a particular computer (i.e. LocalScript client-side). So let's say your computer is A. However, you need to set the properties of the VehicleSeat on whatever machine is simulating the vehicle. Let's call that computer B. This computer is very likely not the one you're getting input from, so now you need to replicate the input you got from your computer back to the server, and potentially from there to the different computer. So for any relevant key input, you need to have A --> Server --> B; simulation will then change/execute on B, and will send physics packets B --> Server --> A, where you will finally see the results of your keypress (after being run through the dPhysics interpolation code, which can potentially add a few small artifacts depending on how far away the car is from you). So unless you can force the vehicle to be simulated on A (by some horrible hack where you manage to somehow convince the physics engine the vehicle is a part of your character, which is always simulated locally), then this is the best you can do (assuming already that there are no inefficiencies in its implementation).
For my attempt to do something like this "as best as possible", check out the scripts from that "Boat Seat" project (there was a post on the blog about it some time ago). I think I commented the code there pretty well, and it should work for generic vehicles (not just boats), and is pretty easily extendable to do some pretty cool stuff with vehicles (I have a utube vid. where I added a few "extras" to a jeep, if you want some more ideas to get you started).
- HotThoth
~ I Thoth so ~
|
|
|
| Report Abuse |
|
|