Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Adam Z on January 09, 2013, 01:41:20 PM

Title: GUI Scale Object Help
Post by: Adam Z on January 09, 2013, 01:41:20 PM
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.
Title: Re: GUI Scale Object Help
Post by: jeanfabre on January 09, 2013, 01:55:17 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
Title: Re: GUI Scale Object Help
Post by: Adam Z on January 09, 2013, 02: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?
Title: Re: GUI Scale Object Help
Post by: Adam Z on January 09, 2013, 02: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...
Title: Re: GUI Scale Object Help
Post by: jeanfabre on January 09, 2013, 02: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
Title: Re: GUI Scale Object Help
Post by: Adam Z on January 09, 2013, 03: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!   ;)
Title: Re: GUI Scale Object Help
Post by: jeanfabre on January 09, 2013, 03:16:32 PM
:) done that too. you should have plenty to study now.

bye,

 Jean