Hello Fellow Developers, I have an issue with constraints that I’m using on an A350-900(For Those Who Don’t Know, Its A Civil Aircraft By Airbus XD)
The following attachments will show you the issue I’m having. The problem I assume is that the constraints are moving serverside when the plane is anchored. How is the plane Anchored? Its Anchored via a remote fired client to server script which just anchors
the primary part of which all the welds, minus the constraints are attached to. This part known as “Main” in the system is cliently Set when the pilot takes seat in the plane. The constraints used for the parts are mainly, Hinge constraint
Spring, and cylindrical. These, however, I don’t know if they are lagging or just can’t work cliently and therefore move on their own locally. It’s a big problem when the plane is anchored as shown in the video. I’ve spent 2 weeks looking for a fix but didn’t seem to find anyone with my issue other than a topic of similar style via a stream train issue with client lag messing constraints up. I’m asking for anyone with an Idea to help me out in the right direction. Thanks. The plane is powered by a body gyro and a body velocity in Main. These are controlled by the private module to allow somewhat small added protection to the system if somewhat leaked. Anywho thanks for reading and can’t wait to hear from you.
The picture basically was taking off the plane on the server in which is FE and basically when parked the planes constrained systems to start moving on their own, The parts they are attached to are welded directly to the main block which its network ownership is set to the player. The plane came to a full stop and then was frozen yet replicated the same incident.
This is for a project I’m working on with my friend and he wanted me to post this since he isn’t apart of the DevForums.
So to anchor, you simply are sending an event that commands the plane to be anchored server-side from a singular part, correct? If so, I would try having the server also anchor all the parts that are connected via constraints. Furthermore, you could also try having the client locally anchor all the parts in conjunction with the server.
If this is the case, it looks likes when you anchor it the ownership will be reset to auto and it might be going back to the sever. Not even sure if that is what would cause this issue tho.
Thanks indeed for responding. Yeah so before this I had to. Offer a temp solution which was to anchor the parts holding the constraints aswell when the server side remote was triggered. Issue was that it meant the Co strains wouldn’t move like doors, and engines when the plane is to be started or shutdown or doors open for passengers to disembark
I see yeah that is very true because I noticed that with network ownership it can be set to auto if the part is anchored which becomes an issue for me as I need the plane parked to avoid possible glitches by players jumping about to find a seat. Should I anchor another part of the plane not network controlled instead?
I highly recommend that you use network ownership, I have experienced the same problem with steam trains and thanks to network ownership the problem didn’t occur as much as before.
Indeed I’m using network ownership when player sits down on seat its then set to client. I believe the issue is triggered then when network ownership is lost after anchoring the plane which allows it to then from client to server update its position some how invisibly hence why the constraints most likely take a walk away from the plane. Can anyone verify then that this may be the cause?
Does everything work again if you get out of the seat and back in? Are you resetting the ownership when it is unanchored or just when a player sits? Maybe you just need to set the ownership again when the user unparks it.
Thanks yeah I mean when the pilot jumps out the network ownership is set to auto. If they jump back in then its reset to client. When the constraints fly off they usually come back after plane is unparked almost like boomerangs. Im just confused why they leave in the first place and if its possible to anchor other parts of the plane without causing a massive problem to the client connected part (Being “Main” which holds the engine forces)
Yeah, I’m not sure exactly why it’s happening but have a feeling it has to do with network ownership mismatches. As far as fixing it have you tried cycling through all parts and anchoring them? You might also try using a body position on main and setting max force vector to math.huge and position to it’s current position when parked, then setting max force to zero when unparked.