I am creating a single object (1 brick or mesh) helicopter using the built in ROBLOX Physics engine. Currently I am using Vector Force constraint to do the simulation and Angular Velocity constraint to tilt the helicopter.
What I’m doing basically is calculating and updating the Force in the Vector Force constraint every frame (I’m using RenderStepped) to make the helicopter move realistically.
Is this recommended? Or is there a better way to handle updating the Force in Vector Force constraint.
The reason I’m asking is because every like 10 seconds the part I’m using Vector Force constraint on just randomly drops and physics stop being applied to it for a few seconds and then returns back to normal.
I’m still doing beta test on the client, so everything is running client sided so I’m not sure what the problem is. The only thing I can think of is it throttling due to me updating the Force every frame.
This should not happen if the player has the network ownership. Yes, this is a correct way to do this, as long as you can calculate the physics correctly (Gravity can be a pain).
Try doing more testing for the 10 seconds thing, it might be a glitch. If it’s not, try playing around with network ownership
If the helicopter was created from the server, then you get network ownership when you’re next to it (Unreliably). In that case, you want to force the network ownership by calling BasePart:SetNetworkOwner() from the server.
Is it possible that because I am manipulating the object on the client side, ROBLOX tries to reverse these changes? Because when I set the network owner to the client it moves then teleports back to its original position a second later.
No, this does not usually happen and should not happen. The teleporting back might be a weird roblox glitch.
Sadly, without seeing the code, I can only assume what the problem is. If it’s not network ownership, then it might be a glitch in your code. Does the VectorForce velocity go to 0 when the glitch happens? Do you have a video of what it looks like?