playMaker

Author Topic: How to work with multiple components on an object  (Read 864 times)

Oleg

  • Playmaker Newbie
  • *
  • Posts: 5
How to work with multiple components on an object
« on: August 02, 2023, 02:18:23 PM »
Hello

I decided to try playmaker when creating my project. I immediately had a question. How can I work with multiple components on a game object? If I try to set the properties of the component, then the properties of the first component change, I can't get to the next component.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #1 on: August 03, 2023, 07:30:29 AM »
Hi.
Can you give more info on which components?

Oleg

  • Playmaker Newbie
  • *
  • Posts: 5
Re: How to work with multiple components on an object
« Reply #2 on: August 03, 2023, 09:44:56 AM »
I'm talking about Wheel Joint 2D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #3 on: August 03, 2023, 11:27:04 AM »
why you have 2 wheel joints on 1 object?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #4 on: August 03, 2023, 11:33:03 AM »
Hi.
I made a version from the action where you can drag in the wheel joint component directly (attachment below)

Oleg

  • Playmaker Newbie
  • *
  • Posts: 5
Re: How to work with multiple components on an object
« Reply #5 on: August 03, 2023, 11:58:56 AM »
Thank you for your attention and time spent.
I didn't understand how to use your Scripts.
I accidentally bought a playmaker and decided to use it in my new project, but unfortunately I encounter too many informational difficulties when using it.
I changed the design to use one component, but still a new problem appeared - I can't disable UseMotor when releasing the button...  :'(

 I will still return to the classic script writing.


Oleg

  • Playmaker Newbie
  • *
  • Posts: 5
Re: How to work with multiple components on an object
« Reply #6 on: August 03, 2023, 12:04:31 PM »
does not work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #7 on: August 04, 2023, 07:56:06 AM »
Hi.
and can you enable?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #8 on: August 04, 2023, 08:00:28 AM »
Hi.
Looking to the code of the script it should work correct.

disable useMoter stop applying force, which means it can still rotate until drag will make it stop

Code: [Select]
[Tooltip("Should a motor force be applied automatically to the Rigidbody2D?")]

Oleg

  • Playmaker Newbie
  • *
  • Posts: 5
Re: How to work with multiple components on an object
« Reply #9 on: August 04, 2023, 02:04:20 PM »
Hi.
and can you enable?
Yes, it turns on, but it doesn't turn off

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to work with multiple components on an object
« Reply #10 on: August 06, 2023, 01:43:45 PM »
Hi.
Looking to the code it should work, but turning of use motor does not stop rotation, it stops adding force.

so if its still rotation you need to stop the rotation by increasing angular drag for example.