playMaker

Author Topic: How to set Physics Material - Bounciness?[SOLVED]  (Read 3839 times)

Ouch

  • Playmaker Newbie
  • *
  • Posts: 3
How to set Physics Material - Bounciness?[SOLVED]
« on: February 02, 2014, 06:43:26 AM »
Is it possible to set the bounciness of a physics material attached to an object's collider in Playmaker?

I have a GUI Slider that I would like to hook up to this parameter, but can't see it listed anywhere.

Thanks
« Last Edit: February 04, 2014, 12:47:39 PM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to set Physics Material - Bounciness?
« Reply #1 on: February 02, 2014, 10:01:02 AM »
http://docs.unity3d.com/Documentation/Components/class-PhysicMaterial.html

When creating a new phys mat the option is right there.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Ouch

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How to set Physics Material - Bounciness?
« Reply #2 on: February 02, 2014, 05:43:51 PM »
Thamks for the reply. Sorry, i don't understand. I don't want to create a new material, simply access an existing one's bounciness parameter in Playmaker so the user can change it with a gui slider. I can't find any access to it via Actions/physics, or anywhere else.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to set Physics Material - Bounciness?
« Reply #3 on: February 02, 2014, 05:59:44 PM »
Oh, right I misunderstood.

Make a new Object variable, choose UnityEngine > PhysicMaterial.
You can use Get Component to fill the Object variable from your material.
Add a Set Property action, choose that Object var.

Thats a roundabout way of changing the variable, you just need to connect the slider to the variable.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Ouch

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How to set Physics Material - Bounciness?
« Reply #4 on: February 04, 2014, 07:23:28 AM »
Thanks very much, worked like a charm :)