Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

throw ball along path

Discussion in 'Physics' started by triboolpraktikum, May 14, 2018.

  1. triboolpraktikum

    triboolpraktikum

    Joined:
    Apr 3, 2018
    Posts:
    4
    Hello, i want to throw a ball, but before i want to see the path
    i use simple physics math like : sy(t) = vy * t + g * t * t ;
    sx = vx * t;

    then i use rigidbody.velocity = tranform.forward * velocity;

    in the calculation i use the same velocity of corse.(the same vector3)
    g is 9.81 of corse

    my parabola looks pretty fine but doesnt match the path the ball goes in game.
    Is there anything i should know about physics and units? (I am little noob....)

    any ideas?
     
  2. triboolpraktikum

    triboolpraktikum

    Joined:
    Apr 3, 2018
    Posts:
    4
    g = - 9.81 **
     
  3. Hyblademin

    Hyblademin

    Joined:
    Oct 14, 2013
    Posts:
    701
    Did you set linear drag to 0 in the Rigidbody properties? Drag makes this formula inaccurate.
     
  4. triboolpraktikum

    triboolpraktikum

    Joined:
    Apr 3, 2018
    Posts:
    4
    Hello thanks for reply,

    i testeted to change drag and angular drag to 0f didnt change anything ;D

    since i use a random velocityMultiplier of 1.4f the curve matches fine in my range of usage,
    i think my formular is right somehow, but the velocity seems to be different.

    if i use multiplier of 1f, the ball always fly byond the highpoint( to strong)