Animating Prop Movement: Scaling Props
Sometimes during platformers, you’ll encounter obstacles that change their dimensions. These could be platforms that grow and shrink in size, or get taller or shorter along a certain axis. When an object’s dimensions are modified this way, it’s called modifying its scale.
An object's scale tells you how much to multiply each of its dimensions, relative to itself. Normally, objects have a scale of {X := 1.0, Y := 1.0, Z := 1.0}. If you double the Z value of an object’s scale, it becomes twice as tall. If you half it, half as tall.
Scale is the final part of the transform puzzle. In this section, you’ll learn how to manipulate scale to create objects that grow and shrink to different sizes.
Making Props that Scale
Follow these steps to build the code that scales your props:
-
Create a new Verse class named
scaling_propthat inherits frommovable_propusing Verse Explorer. Add the<concrete>specifier to this class to expose its properties to UEFN.| | | | --- | --- | | | # A prop that scales toward either a given scale or a Creative prop's scale. | | | scaling_prop<public> := class<concrete>(movable_prop): |
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.