playMaker

Author Topic: Spawned Prefab workflow question  (Read 1250 times)

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Spawned Prefab workflow question
« on: March 25, 2015, 08:23:35 PM »
Hey,
I've been having an issue with prefabs I am spawning and I think it's mainly user error and I am misunderstanding something in the workflow. Any advice would be great, thank you.

What I am trying to do -
Get a spawned object (Projectile from an enemy) to move towards another moving object (Player) and hit it. Like a seeking missile.

How I am currently doing it -
Created a projectile prefab with a "Move to update" action that should look for the player as well as the player tag.
Create that object from the enemy gun.

Everything spawns in ok but the object always just moves to 0.0.0 in the world (or the origin of the player controllers original position in the world) and doesn't find the player. It does cause damage when it hits though and does everything else it is supposed to do. It just doesn't seem to be tracking and updating with the player movement.

btw this seems to work fine for objects that exist in the scene already, just not any that are created.

That's the very short version. I am just wondering if anyone has a better recommendation for how I could do the exact same thing with a slow moving projectile than can update with player movement.
I'm using unity 4.6.1.
Thanks