Search Unity

Rigidbody_Velocity

Discussion in 'Getting Started' started by Alekos98, Apr 3, 2019.

  1. Alekos98

    Alekos98

    Joined:
    Feb 24, 2019
    Posts:
    1
    Hello,I'm new to unity and I want to make a car game,I already have a fully working car from unity asset store.My problem is that I'm not sure about how to calculate it's velocity and then display it on my screen.The script that makes the car move is applied on the wheels.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Do you really want the car's velocity (as in, direction and speed at which the car body is moving)? Or do you want what a speedometer would show, i.e. the speed implied by the rotation of the wheels?
     
  3. pod11

    pod11

    Joined:
    Jan 6, 2019
    Posts:
    60
    Is unity velocity a variable you can check and depend some other code on its value?
    what is the type of it?
    I mean ; could value of velocity be used to measure objects speed?
    For example if i was using add force to move projectiles could i capture its velocity to measure how much damage it could inflict?