Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Specific Driving Behaviour

Discussion in 'Physics' started by MGutsmiedl, Oct 18, 2019.

  1. MGutsmiedl

    MGutsmiedl

    Joined:
    Oct 18, 2019
    Posts:
    8
    Hello Guys,

    this is my first post and im relatively new to unity and its features, so please forgive me if im doing sth wrong or do not understand instantly what youre talking about.

    I have a question about the driving behaviour of a specific cart.

    Its like a shopping cart but with the exception only the 2 wheels at the "grip side" can rotate in every direction and the 2, or sometimes 1 front wheels are stiff and cant change directions.
    I want to change the behaviour of a cart in the virtual reality environment, so the cart controll is different than normal. Like for example you have to rearrange the cart somethimes to get to your destination and you can direct around edges. The goal should be a realistic cart for a factory.


    Is there a possibility to arrange that specific driving behaviour?

    I thank you all in advance and would be glad if someone could help me.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,434
    Hello, and welcome to Unity forums!

    I'd configure the wheels that can't change direction as WheelCollider components, like in regular cars. Note that it might be tricky to configure those for a shopping cart because of the light mass, but I think it can be done.

    For the wheels that can rotate freely, I'd use just sphere colliders with a low-friction physic material. This will allow that part of the cart to be freely moved and rotated. Visually, you may write a script to explicitly rotate the visual wheels according to the direction of movement.

    Enjoy!
     
    MGutsmiedl likes this.
  3. MGutsmiedl

    MGutsmiedl

    Joined:
    Oct 18, 2019
    Posts:
    8
    Thank You very much for your Help, im gonna try it !