Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question about Bullet Pos moves after a minute in game

Discussion in 'Editor & General Support' started by SemanticDuck, Nov 10, 2023.

  1. SemanticDuck

    SemanticDuck

    Joined:
    Jul 27, 2018
    Posts:
    11
    Hi everyone I having this issue, hope can someone point me in the right direction... So I have my player with his gun. When I start shooting I see the bullets coming from the end of the barrel but after a minute or so the position of the bullet moves to his chest. I'm using a 3d object at the end of the barrel to code it like:

    public transform endOfTheBarrelPos
    instantiate bullet, endOfTheBarrelPos.transform.position, etc...

    I try to use a coroutine to check every now and then that the position is right but it didn't work
    I'm been googling with no luck

    Anyone... and thanks in advance