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!

Mouse control

Posted by Marius Oberholster on Monday, January 13, 2014 Under: Quick Blog Tutorial
Good day there everyone!

Today I'm coming at you with another QBT! Still on BGE; that page is really growing! JESUS is so good to us with all this free content! Just amazing!

We are covering, mouse control!

This is a bit of an off-topic of what I thought I was going to do, but this is also quite crucial to some games, so this may just surprise you.
   When using the mouse for control, we can do pretty much anything with it with logic bricks, except use it as a looking point. In other words, there is no MouseLook logic brick just yet. It has been requested though!

For now though, let's focus on what can be done with the mouse:

Let's, for the sake of example, just use Wheel Up (forward) and Wheel Down (backward) as an example for rotating a cube:

As you can see, since these have been separated, unlike mouse movement (counts as a single pulse, it's not an aim-er), you can use this to rotate things. Simply set this up:
Mouse > And > Motion
Mouse: Wheel Up, true pulse mode (gives smoother motion)
And: Leave as per default
Motion: Simple motion, with any axis rotation marked as more than zero

Mouse > And > Motion
Mouse: Wheel Down, true pulse mode
And: Leave as per default
Motion: Simple motion, opposite of first setup

It is truly that simple! Now, if you add some lights and start your game, you literally rotate the object using the scroll wheel. Ta-da! haha

Have a brilliant day and remember to give other controlling sensors a try as well, such as Keyboard. You'll see it differs a little from how Mouse works, and gives you a little bit extra!

Thank YOU!!!!!!!!!

In : Quick Blog Tutorial 

Tags: jesus  controls  mouse  bge  blender  game  engine  new  quick  blog  tutorial  control  scroll  wheel  up  down 

"For I testify unto every man that heareth the words of the prophecy of this book, If any man shall add unto these things, God shall add unto him the plagues that are written in this book:
And if any man shall take away from the words of the book of this prophecy, God shall take away his part out of the book of life, and out of the holy city, and from the things which are written in this book.
He which testifieth these things saith, Surely I come quickly. Amen. Even so, come, Lord Jesus.
The grace of our Lord Jesus Christ be with you all. Amen."
Revelation 22:18-21

"Add thou not unto his words, lest he reprove thee, and thou be found a liar."
Proverbs 30:6

King James Version, Public Domain

Ultimate Glory

I give glory to, acknowledge and remember God for this website. He enabled me to do all this and this website belongs to Him. Thank You!


Make a free website with Yola