Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: IIKII on January 08, 2015, 10:30:24 PM

Title: Prefab problem[Solved]
Post by: IIKII on January 08, 2015, 10:30:24 PM
Hi,

I have a working character that moves using the axis vector, controller simple move & smooth look at direction. Then i have a camera with get/set position and itween rotate update. Everything is working fine.

After i put it into a prefab, the character movement or the direction is not working right.

Is there anything i need to know about working with playmaker and prefab?

Title: Re: Prefab problem
Post by: mweyna on January 09, 2015, 02:15:55 AM
If your prefab as any references to scene objects in the FSMs that tends to not work and forget the assignments. Just be sure all your FSMs use non scene objects or have logic to find the corresponding object upon creation.
Title: Re: Prefab problem
Post by: IIKII on January 09, 2015, 03:32:25 AM
Sorry i dont quite understand because i am new to unity and playmaker.

Do you have any examples or file so that i can better understand it.
Title: Re: Prefab problem
Post by: richardh on January 09, 2015, 06:06:00 AM
If your logic FSM has smooth look at then the FSM has been told to look at 'something' in your FSM. When you create the prefab then the prefab looses the connection to that 'something' it's supposed to look at since they are two separate objects.
Title: Re: Prefab problem
Post by: IIKII on January 09, 2015, 10:44:34 PM
oh..i finally solve it.

My character has a get axis vector and cannot find the camera to be relative to. I use find gameobject action to find the main camera and store the result to be use for my axis vector.

thanks for the answers!