So I have created an object pooling system. Essentially, you will fire a projectile, it gets added to the pool, and when you fire again it will check if a projectile exists in the pool array and then attempt to reuse this projectile. This projectile, on hit will get hidden and have collision removed and it will also have an ‘in use’ variable set to true once its used. Once it makes contact with a wall or an AI, it will have the ‘in use’ variable set to false again waiting to be pulled from the array.
The issue I am having is that when it pulls that projectile out, it does not move in the forward direction it is supposed to. It actually does not move at all. I am not sure how to add velocity to this projectile once its stopped. Any Ideas?
I guess I just dont understand which one to apply to my project, nor how to actually apply that. I was messing around a bit with different velocities and the 2 nodes as well. If I set the world velocity, the reused projectile will just spawn in the same space the last projectile hit. I guess Im not sure how to make it start from one location lets say, muzzle tip, and then fire across till it collides again and then goes into the pool again.