2

I just strated using blender game engine. I m making a game in which a ball or sphere move but i want to move it by the button on the screen. Which i made in another scene by overlay with main game screen. Can any one give me idea how do it. If i press the button with mouse ball should move in any dirction.

Lukasz-40sth
  • 3,062
  • 7
  • 19
  • 30

1 Answers1

3

Possible example: This will move the ball in one direction, if you press the button. Welcome to the Blender StackExchange!

enter image description here

To detect the click on your button add a mouse over sensor and a left button sensor to your button. Combine them with the default AND controller and use a message actuator to send a message e.g. "moving" to your ball. Make sure that one of the Sensors has true-level-triggering enabled, so your ball keeps moving while you keep pressing.

enter image description here

Catch that message to your ball with a message sensor (set right subject) and connect it with the motion you want. enter image description here

Quacksilber
  • 588
  • 6
  • 20