playMaker

Author Topic: GUI Scale Object Help  (Read 2326 times)

Adam Z

  • Full Member
  • ***
  • Posts: 151
    • View Profile
GUI Scale Object Help
« on: January 09, 2013, 11:41:20 AM »
Im creating a slider to scale my character. 

I have a Scale (Float) Variable.
I have a GUI Horizontal Slider with Scale in the Float.
I have a Set Scale with Scale in the Float for X, Y and Z.

When I play it the object is at a 0 in size (XYZ), and when you slide the slider to the far right the object is at a .4 (assuming 1 would equal the normal size).

Any thoughts as to how I set it up so the object starts at the normal size of 1, the slider nob is in the middle, and you can scale it in either direction (left for smaller/right for larger)?

Any help would be appreciated! Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: GUI Scale Object Help
« Reply #1 on: January 09, 2013, 11:55:17 AM »
Hi,

 Gui slider actions have a left and right value, so you simply set the left value to the smaller scale, and the right value to the bigger scale, and you preset the slider knob value to 1 when you begin, that's about it. then you use the "set scale" action and inject in x, y z the slider value.

I have attached a working scene. Tell me if that's what you aim for.


Bye,

 Jean

Adam Z

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: GUI Scale Object Help
« Reply #2 on: January 09, 2013, 12:08:45 PM »
Hi,

 Gui slider actions have a left and right value, so you simply set the left value to the smaller scale, and the right value to the bigger scale, and you preset the slider knob value to 1 when you begin, that's about it. then you use the "set scale" action and inject in x, y z the slider value.

I have attached a working scene. Tell me if that's what you aim for.


Bye,

 Jean

Your example works great, thanks!  My character is still squashing though. Could it be because I have other objects parented inside it?

Adam Z

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: GUI Scale Object Help
« Reply #3 on: January 09, 2013, 12:15:05 PM »
Im not sure why it's doing that. I parented another cube to yours and your still scaled correctly.  I even turn off all my other FSM's to see if there was a conflict of some sort, still nothing...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: GUI Scale Object Help
« Reply #4 on: January 09, 2013, 12:17:56 PM »
Hi,

 odd... are you sure you are setting up all axis? maybe the parent of your gameObject doesn't have a uniform scaling to begin with?

bye,

 Jean

Adam Z

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: GUI Scale Object Help
« Reply #5 on: January 09, 2013, 01:10:11 PM »
Hi,

 odd... are you sure you are setting up all axis? maybe the parent of your gameObject doesn't have a uniform scaling to begin with?

bye,

 Jean


I have no idea why it was doing that. Since the scene was very simple trying to get the functionality to work, I just redid it and now it works fine. Thanks again for all your help!

If you'd like to help me with my rotation problem in another post, I would certainly appreciate it!   ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: GUI Scale Object Help
« Reply #6 on: January 09, 2013, 01:16:32 PM »
:) done that too. you should have plenty to study now.

bye,

 Jean