How to Have Two Child Objects of One Parent Detect Collisions Between Eachother.


Essentially I am just trying to find a way to have my objects that are children of one large parent object (a spaceship) to detect collisions between each other. The reason why I am trying to do this is so when my spaceship moves the players and everything else moves along with them, however inside the ship the player can move independently. I just can’t find a good way to simulate it unless the character are children of the ship (I tried using joints).

If you can help me find a way or there is some other way to simulate what I am talking about that would be most helpful.

I might have a solution for you. I made a Sea of Thieves mock up a while ago, and to solve a similar problem I created a none moving ship (spaceship in your case) and a visual one. The camera only saw the visual ship that could freely move around the ocean. But the physics based ship was static and allowed for the players to move around it, but not fall off into the ocean. I parented the players rigidbodies to the physics ship, and the graphics players models to the graphic ship. Then I set the local position of the graphics players to be the same as the local position of the rigidbody players. Thus it gave the appearance that the players were moving around the ship while the ship was sailing the open seas. Hope that helps.