The intention is to simply have a raft that players can walk around on and swim up to. The walking part is fine, but as soon as a character swims up to it, the raft starts bouncing around and going out of control.
I’ve been racking my brain trying to get around this seemingly inescapable bug in the Roblox physics engine. Part densities don’t seem to come into play, as the object being thrown around by the player is many times more massive than the character.
Should I ditch this game idea? How do other games with floating objects like Sharkbite/Tradelands work? I really need someone to help me out!!
Could you try anchoring your ship by attaching it via a weld to an invisible, uncollidable, dense part with a similar size to the raft? This might be a work around to your issue. Otherwise, you’ll have to use some sort of maths to keep its position relative, or even use your own raft system over the roblox physics.
The raft is intended to float around and be driven by the player. Default roblox water is certainly an option, i just prefer a custom solution because of how much more control I would get.
Perhaps instead of using a BodyForce as the force on the water, maybe use CFrame manipulation in conjunction with PIDs to give your boat and player a more believable water. This will also give you more control over the rafts and won’t have them interfered with by the player.
Did you want players to be able to push the rafts around? If not, one fix might be a one-way collision group in which players can touch the raft, but the raft can’t touch players.
I don’t often deal with raw physics, so I would personally write my own system for specific physics interactions that I don’t trust Roblox’s physics to handle. A raft/boat system might be one of those.
Using Collision Filtering, you can make groups of objects collide or not collide with other groups. NoCollisionConstraint is another option, but it’s on a per-part basis. Now to make it one-way, as far as I’m aware, that isn’t possible directly. However, you can use FilteringEnabled to make it work the way I’m meaning. Basically, you make players and rafts not collide with each other server-side, but make them collidable on the client right after. The end result should be what I said.
I am acquainted with collision groups. I’m not exactly sure what you mean by a one way collision group though. How do I make it so a player can collide with a raft, but the raft is never affected by a player?