Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Rigidbody problem with launch distance

Discussion in 'Physics' started by kotoffei, Dec 3, 2020.

  1. kotoffei

    kotoffei

    Joined:
    Jul 8, 2019
    Posts:
    15
    Hello everyone!

    I'm trying to make my character throw grenade at mouse position (top down view).

    I've found some tutorials for trajectory calculation. For exemple those 2:
    https://learn.unity.com/tutorial/ca...d=5df2611eedbc2a0020d90217&architecture=true#

    https://www.habrador.com/tutorials/unity-realistic-bullets/

    When i'm launching the scene from one of this projects, everything works well. But when i try to implement to my project i have some problems.

    My (sort of) gun seems to respond to mouse position and it changes angle accordigly. But when i instantiate a projectile it seems to fly to the same distance despite the angle.

    Could you advise something?

    Of course i can add some code or screenshots.

    Thank you in advance.