Playmaker Forum
PlayMaker News => General Discussion => Topic started by: grimmy on February 14, 2014, 11:05:55 AM
-
I have a prefab tree sprite which I always want to look at the main camera. The problem is that I can't assign my prefab 'Target Object' an object within the scene (ie the main camera). I can only choose from prefabs.
How do I make a my tree prefab always face the camera so I don't have to assign the target object again to every instance each time I place a new tree?
-
Use get current cam or get main cam (not sure how its called) in the inti of the tree script - put the cam in a local game object variable - use that variable as look at goal.
Or put the Cam (or what ever Object) in a Global Variable and use that instead in your prefab as look at target
cheers
peter