Possessing different gameobjects in a level?

Soo basicly what I’m trying to do is the following:

  • I have an third person camera and stuff… (CHECK)

  • I can check if the mouse is over another AI gameobject (CHECK)

  • I want to replace the controllers of the AI with the playercontroller and camera? (HELP)
    Is this possible to do like Unrealscript? I could just do Controller.Possess() in Unrealscript.

What is the best way to create this?

Many thanks!

I think that there is something like this in the Lerpz2D tutorial from Unity site. There you can change the control between one character and its ship.

You should design your components to be modular enough that you can just detach/attach your “read player input and apply it to movement” script to any AI.

Meaning, among other things, don’t rely on object names.