Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: krane on February 28, 2017, 02:09:04 PM
-
I'm still having problems with a simple spawn.
I have an empty game object, "spawnPoint".
On the spawnPoint's FSM, I have Get Owner (and store the location as spawnLoc).
I then have Get Random Child to get a random game object to spawn, which gets saved as randomObj.
I then have Create Object with randomObj as my object to create and spawnLoc as my spawnpoint.
The object is created in my hierarchy, but not at my spawnLoc.
I can't even find it in the scene anywhere.
-
Not sure I understand the structure but it seems to me like you may need to convert a position from local space to world space (Transform Position action).
-
Thanks, but with create object, you can set a game object as a location point, no? That's what the "spawn point" is for? I don't see where converting from world to screen would come into it if I've already positioned the game object to spawn at.
Maybe I should specify I'm in 2D, but right now I've taken it even more simply to creating an empty game object, and on the FSM for that object, using create object and setting spawn point to an empty game object (dragging it from hierarchy to spawn point) and it's still not spawning.
The game object is on a canvas panel.
Can someone show me a simple 2d spawner???
-
Update: Not sure if this counts as "Solved" or not, but I found if i used create object advanced and parented the item to the canvas then it works.
-
Hi,
yes, parenting inside canvas is tricky, I use SetTransformParent custom action ( from the ecosystem) for everything inside a UI canvas.
Bye,
Jean