playMaker

Author Topic: Projectile Returning to 000 when spawned  (Read 1850 times)

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Projectile Returning to 000 when spawned
« on: June 14, 2014, 01:39:36 AM »
Hey, first time posting.
This problem has been troubling me for months now and I have attempted everything, so I hope I can find an answer here.

SETUP
I have a prefab object using
Move to Update
with rigid body and FX
Selecting an enemy prefab Game Object to move towards
Spawned from main character biped hand
The projectile "always" moves to 000 when it's spawned.. never to the enemy
I have tried every variation of this and no luck:(

My guess is it's not finding the enemy, so I have tried multiple ways to make sure it;s found  with raycast etc, even using no prefabs and every Game object specif within the level etc..

Any ideas or pointers towards a better way to do this would be amazing.

I also have to say that playmaker is the greatest thing that I have discovered "ever"! Thank you, Thank you so much.. It has opened up a whole world for me that I could not access before. I;ve been working as an artist in the games industry for many years now and had to rely on someone else to help me with the programming side. I've been using playmaker about 6 months now and I'm finding I can make up my own ways of doing complex things that are far beyond what I imagined or what I could ask others to do. You guys are awesome.

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: Projectile Returning to 000 when spawned
« Reply #1 on: June 14, 2014, 05:53:47 PM »
Your best bet is to parent the projectile to a gameobject, which could be just empty gameobject at the nozzle of the weapon.

Use "Set Parent" action and tick on both Reset Local Pos, Reset Local Rot.

You can also pick the Vector3 position ("Get Position") of the spawn point, and set the projectiles position to that value ("Set Position").

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Projectile Returning to 000 when spawned
« Reply #2 on: June 14, 2014, 10:42:19 PM »
Hey Thanks for your reply. I tried this, but getting an error, "Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption". Also, If I try to drag my new game object into the parent section of "Set Parent" I am unable use that asset, I only get an option for set property or get property. I'm not sure what I'm doing wrong here.

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Projectile Returning to 000 when spawned
« Reply #3 on: June 14, 2014, 10:50:11 PM »
I should add that through an input manager, on Mouse button down, right click I am creating the object that is my projectile prefab.. The input manager sits inside of the main character prefab, not sure if that has anything to do with it.