So I have a small project in Unity that requires me to move a cube and fire projectile clones out of it. Problem is that it only fires the clones from where the cube started and not where the transform within the cube moves to. Any suggestions or help?,So i’m building a basic project in Unity and i’m trying to get a cube to move and fire projectiles. Problem is that the projectile clones will only spawn where the cube started and not from where it is when I move. Anyone have any ideas?
Projectile clones won't spawn by the transform object,Player projectiles refuse to fire from where the player is
The problem seems to be that you stored transform.position on Start() method, which is why the projectiles spawn at wrong position. Try providing current position.
If that is not the case, the source code would help a lot to find the problem.
I’ve tried that but it doesn’t work