- Home /
How to move my weapon to new camera?
I'm creating a FPS and I've got a minigame inside the little world. When the player enters the minigame I disable the mainCamera and enable the minigame camera. How can I move the bow object onto the new camera? In minigame mode I can move the camera upwards but the bow is still shooting straight instead and not at the new angle
I'm looking for a line of code as an answer not a suggestion. I know I need to parent the bow object to the new camera but I cant seem to figure it out
There is not enough information for us to fully understand your problem. One solution would be to place an empty game object at the position and rotation you want the bow for the $$anonymous$$igame camera. Then you could make the bow a child of the marker object. You would do:
bow.position = marker.position;
bow.rotation = marker.rotation;
bow.parent = marker;
Of course you'll have to unparent it when the $$anonymous$$igame is over.
Your answer
Follow this Question
Related Questions
Top down camera for object moving on sphere 1 Answer
A smooth camera follow that allows for rotation functionality independent of the player. Maths? 1 Answer
Standard Asset FPSController Camera Jumps Around on First Mouse Movement 1 Answer
Camera follow player's rotation 3 Answers
Thumbstick camera rotation is slower when rotating in a diagonal direction 1 Answer