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!

BGE - When falling, and falling, and falling and falling

Posted by Marius Oberholster on Thursday, November 7, 2013 Under: Quick Blog Tutorial
Hey all!

This is a seriously common problem and one that could definitely use a QBT. I honestly thought I needed a script for this, but oddly enough, without panicking, haha. But, you don't need a script for it!

So, today, I'm going to tell you how to restart your scene, if your character falls off an object, passed the point of no return. I am including a finished Blend at the end of this post (some prefer it and I know it has helped me to look at a finished file). Here's what it looks like, the character is the ball:


Let's begin.

When you have added a cube and a plane, and made both a rigid body and you added some basic controls to them, you've noticed that when you move passed the plane, you tend to fall indefinitely (if you don't press escape or have some sort of timer set to start counting down after your character ceases to make contact). This is a very easy fix.
 > Add a plane in the area where your character may fall off, like at the bottom of a pit or whatever
 > Add a transparent material to it and turn off backface culling in it's physics options
 > Go into the Logic editor, add a Collision sensor and click the M/P button, so it will react to a material (the character, in this case, the cube).
   Make sure you have True enabled (the top left button of the Collision sensor, that looks like this: ``` and not ,,,). This will make sure that the sensor is always checking for a collision.
 > In the material property, select your character's material (or any material on your character) and now tie it to what you want to happen, whether it be Scene > Restart, Overlay Scene > Game Over, or whatever. In the example I set it to restart.

Huge note!
Whenever you package your game with the Blender Player, your game is licensed like Blender is. Check this page, right, bottom. It's the official policy on it's use.

And that's it!

I hope this tip helped you a lot! Remember to share share share and, if you liked this tip and would like to see more, check out my portfolio site as well as other QBT's by clicking on the category (Quick Blog Tutorial) under the post title.

Have a wonderful day and thank you for reading!

Thank YOU!!!!!!

In : Quick Blog Tutorial 


Tags: jesus  falling  stop  restart  game  engine  game engine  scene 
Social
(+27) 073 104 2834   |   marius.oberholster@gmail.com   |   Contact

Make a free website with Yola