The Blog

About Me


Marius Oberholster Hey! I'm having an incredible learning experience, not only learning how Blender works (yes, still learning), but also about Open-Source and the incredible software available. Stick around!

A quick tip - progressive scaling

Posted by Marius Oberholster on Wednesday, December 4, 2013 Under: Quick Blog Tutorial
Good day everyone!

Before I get to the tip, I'd just like to remind you guys that shared and liked the BGE page (which I really appreciate btw), that the URL to it has changed. So if you'd like to share the knowledge there and help others get started, just go here and share.

Thank you again!

Now, onto the tip. In the Game Engine, you have what is known as an action actuator. This tool allows us to trigger separate animations on characters, like crouching, ducking, rolling, etc. But! This tool can also be used for scaling and limited rotation.

(Choppy resize can be caused by bezier curves in animation - ie, slow start, fast middle and slow finish -, but due to the size of the action used, it should not have any effect, yet still does. This could mean that there may be a frame or two border between actions)

For example; let's consider a life bar. If you want it decreasing in size, you simply make an action, that would shrink it by, let's say 1 out of 100 life points (remember, your life bar origin has to be where it will end). And you set your Action Actuator like this:
In this case, the animation range was profoundly shortened than for something else. If you have a mario-like game, where a character has to grow or shrink, you need to use collision in regards to the above and make sure your declarations tell your game whether the character is already large or already small. Or, like in the above, it will keep growing, or keep shrinking.

For a life bar, I do not recommend this method for the simple fact that the shrinking remains local (even if Local is not active) and the shrinking increment decreases with every shrink.
   For a life bar, I have a different solution, but that is for another post.

Just for the fun of it, I made a grow and shrink example, but instead of using Play and Add, like in the previous one, we use property. This enables us to use an integer to tell the action what frame to show; or size to show in this case. It's much more straight forward than add and subtract, but for size increase or decrease of unknown sets, the upper method works best. Check it out:

Blend available here

I hope this has blessed you immensely! I've been and I've also learned some new things today as well that I am really excited about sharing, GOD willing.

Hope you all have a fantastic day!!

Thank YOU!!!!!!!

In : Quick Blog Tutorial 


Tags: jesus  action  scale  in-game  game engine  practical  example  feature 
Social
(+27) 073 104 2834   |   marius.oberholster@gmail.com   |   Contact

Make a free website with Yola