Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MrAdventure on July 18, 2013, 03:55:10 AM

Title: Can't set or change position (Solved)
Post by: MrAdventure on July 18, 2013, 03:55:10 AM
Hello,

I am using Create Object to make a prefab.  It always appears at the position the prefab has saved in it, even though I have given it a different Vector3, and then made a SpawnPoint and tried to get it to appear there.

Then, I changed the position of the original prefab to see if the spawned one will come in at a new place.  It doesn't, it comes in at the same location as before.

I've also tried creating it, deactivating it, set position, activate, no change.

Thanks for the help.
Title: Re: Can't set or change position
Post by: Fletch on July 18, 2013, 12:31:36 PM
I didn't know prefabs have positions saved in them.  I'm certainly no pro but I don't think they do.

Can you clarify your issue a little better?  Is your prefab saved in your game already and you're trying to move it or is it just a prefab that you're trying to create at a particular place in your game when something happens?
Title: Re: Can't set or change position
Post by: sebaslive on July 18, 2013, 01:09:20 PM
When you create a prefab it uses the current location it is in for all future prefabs to instantiate to. I don't know how to fix this, I haven't played around with it but I'm pretty sure this is what MrAdventure issue is.
Title: Re: Can't set or change position
Post by: Fletch on July 18, 2013, 01:48:12 PM
I know for network games you can instantiate anywhere.  I haven't had an issue with it in my pickup FSM that spawns gold in various places.
Title: Re: Can't set or change position
Post by: MrAdventure on July 18, 2013, 05:17:32 PM
Yes, it definitely has a position, the one that was in it when I originally created the prefab, the position of the model when I deleted the original.
Title: Re: Can't set or change position
Post by: MrAdventure on July 20, 2013, 01:14:22 AM
I finally figured it out.  The prefab had an animation on it that was at the position I couldn't get it to stop showing up at.  When I disabled the animation, it started going where I wanted.

Since on the subject, how does one disable the position variables in the animation window?  I don't have any keyframes on it.

Thanks for the help!