Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: shack on April 03, 2019, 04:25:12 PM
-
Is there an easy way to do this? I have a health bar (cube) attached to an empty object (acting as a pivot/rotation point) and want the object to slowly decrease in scale over time. Is there a way to do this?
-
Hi,
if it is a 3D object, then you need to make a cube in Blender or any other 3d software and set the pivot point on 1 side.
the standard cube has the pivot centered wich makes it difficult to do the scaling.
to calculate the % (set between 0 and 1) use a float operator and set in Float 1 the Current Heath.
Then in Float 2 the Total Health and Divide.
now you have a result between 0 and 1
You can use that to set the scale.
if you wold use a UI Image you can also use UI Image Set Fill Amount.