playMaker

Author Topic: Can't set or change position (Solved)  (Read 2772 times)

MrAdventure

  • Playmaker Newbie
  • *
  • Posts: 24
Can't set or change position (Solved)
« 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.
« Last Edit: July 20, 2013, 01:19:39 AM by MrAdventure »

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • SneakOnTheLot.com
Re: Can't set or change position
« Reply #1 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?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Can't set or change position
« Reply #2 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.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • SneakOnTheLot.com
Re: Can't set or change position
« Reply #3 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.

MrAdventure

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Can't set or change position
« Reply #4 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.

MrAdventure

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Can't set or change position
« Reply #5 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!