Search Unity

Rigidbody or character controller for a ship riding game?

Discussion in 'Scripting' started by MedoMelo, Aug 6, 2019.

  1. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Hi everyone,

    I'm new to unity and I would like to know if I should go for a rigidbody or a character controller for a third person controller in a 3D open world game.
    This is a pirate game with all the basic stuff coming around it : a system to ride or not boats, the ability to ride a ship with a dozen characters on it...

    I also want to include some basic parcour on the ground.

    After some researches, I learnt rigidebody can be flexible and easy to set up, but with a less clean result, instead of the character controller, which is more time consuming as everything should be coded.

    My main concern is the ability of the boat to host 10 characters and move on the sea, with sometimes crazy waves.
    I feel like with the rigidebody, this would be a pain to set up and the physic will go crazy on the sea...

    To finish, the game will be online multiplayer in a small scale : 4 players max

    Thanks for the help
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    This sounds like about 27 separate engineering questions rolled into one, and many of them dependent on prior steps before they can even be implemented, let alone evaluated.

    Anything anyone here says is going to be based on their experience doing their game, which won't necessarily apply to your game.

    You've already indicated you have read about a few possible directions to use (RB vs CC, etc.).

    It is time to do some actual groundwork to establish which would be best.

    Build a Unity3D scene, have some dry land, a dock, some water, a platform that follows the water heave, and drop an FPS controller into it and see what happens. If it has particular issues, fix them, or use a different type of controller.

    I'm not sure what else there is to add except "Good luck, dive in!" Unity makes testing this sorta what-if stuff really easy.
     
    Last edited: Aug 7, 2019
  3. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,998
    Depends on the look. You might go with neither. Rigidbodies can be knocked around when things hit them, and can easily slide and bounce around on a deck. CharacterControllers can't, but they're easier to get normal-looking motion with. But both will hit things and slide/climb/shove around or over them. A character controller is a standing capsule being shoved around, and looks like it.

    A semi-common trick is turning yourself into a rigidbody on a hard hit, then turning back to normal when you regain control.
     
  4. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Hi, thank you for your answer.
    I actually didn't realize this question was this tricky.
    I will follow your advice here and just try hard !
    I appreciate your help
     
  5. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    That's what I thought, the rigidbody may not be pertinent to use on a deck. Turning it to a character controller on critic moment is an excellent idea.
    I will dig it up and see how it's going.
    Thanks !