Hi guys,
I am making a FPS game and i want that when i pickup a weapon it destroys and creates another object that is attached to the camera(the weapon).
but the problem is that i dont know how to go on doing this and besides that, how does the big games handle this process?
Thank you in advanced
There are a few ways to approach this depending on the feel that you want for your game. The easiest would be to have a parent ‘player’ gameobject that the weapons are instantiated as children too. Then you can have the camera as a child of this gameobject too. Depending on whether you have head-bob or not you might want to lerp the camera’s position on the x-y plane (assuming that you’re using the player’s z axis as forward).
Remember there is no real correct answer. It very much depends on the specifics of your game and how you want it to feel.