- Home /
Attach an object to player character on runtime
So i have a player character ( a girl)
In the game map ive for example a dron. At the beginning the player doesnt have the dron.
I want that when the girl finds the dron, for example ontriggerenter ( dron box collider)....that the dron would be "attached" to the player, lets say at 10 in y axis and -1 in z ( some behind and high). This would enable an "aerial camera".... so i need this drone would follow all the movements of the player character ( if i move forward, left, right ...etc in the game
Thanks
Answer by tormentoarmagedoom · Jan 27, 2019 at 10:16 PM
Good day.
Simplest way is to have a empty object child of the player at the position you want to have the drone.
To attach the drone, just make it child of this empty object.
Bye!
Answer by edufissure · Jan 29, 2019 at 09:13 AM
No i didnt explain myself sorry, the idea is that you begin the game without the dron...then somewhere in the map you find it... and then once the player finds and arrives to the dron, attach it to her,,,, this would enable an aerial view ( that till that moment was disabled) and so the dron has to move with the player... But not at beginning of the game...
Sorry if i didnt understand you...