playMaker

Author Topic: 2D Joints (Setting anchor point in playmaker)  (Read 2260 times)

Reef

  • Playmaker Newbie
  • *
  • Posts: 3
2D Joints (Setting anchor point in playmaker)
« on: February 04, 2016, 03:10:33 PM »
Hi Guys,

Just a quick question, which appears to be obvious to everyone lol:

How do you set an anchor point or an anchor game object on a 2D joint that is on another game object.

I have downloaded all 3 custom 2d joint actions I could find.

I would like to use a slider joint, but the action only has one space for a game object (I assume this is for the object I am actually trying to attach, not for the anchor point (although there is no reference as it is a custom action).

I need to attach a projectile to my character so it returns and my character is a prefab that is spawned in on load, so I cannot simply do this in inspector... (I think I cant, in fact Ill try it- lol only thing left, but Im pretty sure it wont work as it hasn't in other scenarios).

Thank you for reading and I appreciate any input.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2D Joints (Setting anchor point in playmaker)
« Reply #1 on: February 05, 2016, 12:45:47 AM »
Hi,

I'll do a custom actions to cover this, you can also try to use "set property" action


Bye,

 Jean

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: 2D Joints (Setting anchor point in playmaker)
« Reply #2 on: February 05, 2016, 05:55:28 AM »
Hi Jean, thank you very much for reading and answering. To be honest I wish I had searched harder, because as you say- of course it is all possible with set property. I never really had a good grasp of set property and I think the fact that a few joint actions existed confused me, either that or my brain is too fried from all this playmakin.

Thank you once again for your help and for considering creating that action.

Also for other real noobs like me, what I did was simply:

On the Character:
Used action 'get component' to save character's rigid body to an object variable, called 'charRigidVar'.

On the item im joining:
I used 'get component' to save the joint to an object variable.

I used 'set property' to set anchor body and then chose the 'charRigidVar'.

Hopefully, I didnt forget anything lol. Also the tutorial Jean posted above is the only thing that made this workable for me as it explains all those object variable types, that should confuse most noobs like me...

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: 2D Joints (Setting anchor point in playmaker)
« Reply #3 on: February 07, 2016, 12:57:10 PM »
Just to clear up any confusion:

 I am the original poster of this topic lol.

 I was browsing on a laptop I do not usually use and it seems I was auto logged in to an account I had made ages ago (and forgot all about), but never used to post. So once again Jean, thank you for answering the question that I asked as Reef... (now that I think about it Reef is a much cooler account name, I think I may have to switch to that).

Sorry for any confusion everyone.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2D Joints (Setting anchor point in playmaker)
« Reply #4 on: April 01, 2016, 02:19:13 AM »
Hi,

 No worries :)

Bye,

 Jean