playMaker

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

MrAdventure

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Can't set or change position (Solved)
« on: July 18, 2013, 12: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 19, 2013, 10:19:39 PM by MrAdventure »

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Can't set or change position
« Reply #1 on: July 18, 2013, 09:31:36 AM »
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: 565
    • View Profile
    • Frame Tale Studios
Re: Can't set or change position
« Reply #2 on: July 18, 2013, 10:09:20 AM »
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
    • View Profile
    • SneakOnTheLot.com
Re: Can't set or change position
« Reply #3 on: July 18, 2013, 10:48:12 AM »
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
    • View Profile
Re: Can't set or change position
« Reply #4 on: July 18, 2013, 02: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
    • View Profile
Re: Can't set or change position
« Reply #5 on: July 19, 2013, 10:14:22 PM »
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!