playMaker

Author Topic: create game object -- sprite  (Read 2984 times)

krane

  • Junior Playmaker
  • **
  • Posts: 63
create game object -- sprite
« on: February 23, 2017, 10:32:55 AM »
Sorry for the total newb question here. I've got a basic 2D shooter I'm trying to build.
Following the tutorials on Youtube (which are all 3D, so aren't that helpful for 2D), I can create a new object on fire button by using "create object", and the prefab bullet shows up in the hierarchy, but not in my scene. I've got the spawnpoint object as a child of my spaceship. 

I'm sure there's something obvious I'm missing here, but why wouldn't the object show up in my scene?   

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: create game object -- sprite
« Reply #1 on: February 23, 2017, 01:04:19 PM »
If the gameobject is in the hierarchy, then it is the scene somewhere, unless the game object is deactivated. Play the game and then pause it after you shoot. Click on the bullet on the hierarchy and click the F key to focus on it. Or try and see where it is by xyz location. Maybe its behind something? Make sure the game object is activated

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: create game object -- sprite
« Reply #2 on: February 24, 2017, 11:33:47 AM »
Thanks for the help. I can see now that it's spawning way the hell out of the parallax box. Why isn't it spawning where my parent game object is (the ship that's firing it) if it's a child of the ship, as it does in 3D?

I've tried getting the position of the parent, and storing that as a vector, and then setting that vector as the spawn point, but it still doesn't work.
« Last Edit: February 24, 2017, 11:36:22 AM by krane »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: create game object -- sprite
« Reply #3 on: February 24, 2017, 12:37:51 PM »
Haha, at least you found that lost little guy. First step to figuring it out. Is it a child of something? Are things all 0,0,0 for positions? Sometimes the parent object is in the right place, but the child is not set at 0,0,0. So the parent is in the right place, but the child is wayyyy out there.

Are you sure you are getting the right vectors?

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: create game object -- sprite
« Reply #4 on: February 24, 2017, 01:24:11 PM »
I don't see where the vectors could be wrong... I'm attaching the package. I'd appreciate if you could tell me where I'm going wrong.


argh, why is this  so hard!?!?

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: create game object -- sprite
« Reply #5 on: February 26, 2017, 12:44:24 AM »
Sorry I dont think Ill have time to do that. Maybe someone else might be able.

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: create game object -- sprite
« Reply #6 on: February 26, 2017, 09:57:33 PM »
thanks anyway

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: create game object -- sprite
« Reply #7 on: February 27, 2017, 01:19:08 AM »
Hi,

 your package is missing everything unfortunatly, the scene doesn't have anything to show, all prefabs are missing.

 Make sure you test your package in an empty project before sending.

 Bye,

 Jean