Scale By

Description

The Scale By behavior will scale your object by a certain percentage or amount. The default scale of an object is 100% returns the scale percentage of the selected object. 

This behavior will trigger an event on completion.

Note: This will also scale the collision shape of the object. If your scale has a duration greater than 0, the collision shape will be removed and then added again with the new size when it is done scaling. This means your object will not be collidable while it is scaling.

 

Properties

Triggers on Completion

Object A

This is the object that will be scaled. By default the current object is selected, but you can tap the graphic and choose any other object in your scene.

Transition

The effect used for the motion tween animation if the duration is greater than 0.

Units

You can select a unit to use. You can either use percentage or meters.

Scale X

Scale an object by the specified percentage or amount along the X Axis (horizontally).

Eg. Scaling by 25% will make your object scale be 125% wide.

Scale Y

Scale an object by a specified percentage or amount along the Y axis (vertically)

Eg. Scaling by 25% will make your object scale be 125% tall.

 

Duration

How long it will take for the object to scale to the new size.

Outputs

Object ID

This outputs the Object ID.

 

Examples

If you want your object to get 50% larger than it currently is you can scale the X and Y axis by 50%. This will make the total scale 150%. If you execute the behavior again, it will scale by an additional 50% making your object scale a total of 200%. 

Download Example Project

 

Related

Get Scale

Scale To

 

ScaleByReference.gif

0 Comments

Article is closed for comments.