playMaker

Author Topic: please help with Physics[SOLVED]  (Read 1542 times)

t4d

  • Junior Playmaker
  • **
  • Posts: 70
please help with Physics[SOLVED]
« on: April 20, 2016, 01:11:40 AM »
basicly I want a falling object (player)  that i can control by adding force to it as it falls is there a better way to do this ?

if i create the object at run time as a prefab and uses add Force action or Set Velocity the action gives me a message wanting to added a Rigidbody to a prefeab that already has a Rigidbody ?

if i do this all without Prefab and just add the actions at runtime i get these error messages

any help would be very much appeciated. :)



------------------------------------------------------------------------------------------
Can't add script behaviour PlayMakerFixedUpdate. The script needs to derive from MonoBehaviour!
UnityEngine.GameObject:AddComponent()
PlayMakerFSM:AddEventHandlerComponent(HideFlags)
PlayMakerFSM:AddEventHandlerComponents()
PlayMakerFSM:Init()
PlayMakerFSM:Awake()

---------------------------------------------------------------------

NullReferenceException: Object reference not set to an instance of an object
PlayMakerFSM.AddEventHandlerComponent[PlayMakerFixedUpdate] (HideFlags hide)
PlayMakerFSM.AddEventHandlerComponents ()
PlayMakerFSM.Init ()
PlayMakerFSM.Awake ()

« Last Edit: April 20, 2016, 06:00:53 AM by t4d »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: please help with Physics
« Reply #1 on: April 20, 2016, 02:09:35 AM »
Hi,

It's likely due to the fact that the variable "lander Object" is not null at the time you create this action.

 make sure it's null.

 tip: turn "debug" on at the very bottom of the State stack, you'll see the current value of variables. if it's not null, then what is the GAmeobject references, and you'll find that it's likely missing a Rigidbody.

 Let me know if that was the problem, else we'll investigate further.

 What version fo Unity and PlayMaker?

Bye,

 Jean

t4d

  • Junior Playmaker
  • **
  • Posts: 70
Re: please help with Physics
« Reply #2 on: April 20, 2016, 04:15:29 AM »
Thanks Jean

sorry for the muilt posts
I didn't have the Globals Object as a null and didn't have my FSM off the main object

Thanks Your a Legend Jean  8)