assuming 10 wheels = 10 springs
that would be 10 extra things to simulate each tank, but I don’t think that should be a problem, on mid range computers, especially with streaming enabled with the physics pausing implemented
ouchie, then try to make a client based script to get the distance of each tank every relatively long time interval and determine whether to just freeze the wheels or not lol
that’s interesting… server lag? you should probably instantiate the springs on the client and use the method I mentioned previously, it might take a bit of work but it would be worth it
wait I thought about it a bit more and realized this isn’t a very good solution
nevermind!
i think this would work though, why wouldnt it work? i seen games that do this, but in a different way. they make the springs client only on their tank only. the other tanks are just wheels like what i have now and their position is replicated (position of tank not wheels), which i believe spring constraints do automatically
the springs are in very specific spots and their properties are very specific.
i know i could put the properties into a settings file and have the attachments already made and just attach them, which is what i would probably do
but what about the wheel movement? i usually cylindrical constraints connected to the same attachments as the springs but would using hinges and connected to the wheel and a different part that is moved by the spring? if i make that client the wheels wont replicate to the other clients i believe
yeah movement was what I was thinking about when I said it wouldn’t work
that is the complicated part, some more brainstorming is required in that part but I’m sure we can do it!
since the driver should have network ownership of the tank (yes, that invites over exploiters, but its worth it lol), maybe we could do something with that? I have absolutely no idea
network owner automatically will replicate the movement of the mover constraints such as cylindrical and motor hinges. even if their velocity was changed on the client who owned the network owner.
mover constraints by their self dont usually lag its just spinning the wheels, i could keep those on the server and move on the client (like i already do), the only thing im thinking is the spring constraints. if they are client only what happens to the other tanks that arent yours? it doesnt matter if you see those wheels spinning so i could just weld them to the tank so they dont fall through the map or just fall off the tank. but the final thing is, do the spring constraints that got made on that client replicate the position of the tank to the server and rest of the clients? (network owner is set to the driver)
try implementing it first and then see how the spring replication would work, if it works, great! if it doesn’t, at least we have results to work off of!
was going to put this into an edit but ill just say it in a new post
it would be very weird seeing the tank being half through the ramp because it isnt tilting. again the movement is done by a mover constraint so will that replicate? and the springs are just keep it up
in short to everything i just said
network owner automatically replicates movement of mover constraints (motors)
spring constraints created on the client, do they replicate the rotation and height of the tank from the ground to the other clients?
mover constraints will keep the tank in the right position, but tilt will be very off. it can be little bit off but not so much to the point you see a tank on a ramp with half of it inside the wall
nvm i just found out this wouldnt work
this game isnt a game like other tank games, its an vehicle map like armored patrol if you ever played that.
you have to get into the vehicle and you can get in out and whenever you want so if i do that it wouldnt work, i dont have one client connected to the vehicle at all times
do you think just spring constraints on 10 wheels wont lag the server too much?
if spring constraints on all 10 wheels cause lag, try to only do it on the front and back wheels, might mitigate it a bit and keep a pretty good amount of stability
you could also do what @RMofSBI said