Ok so i want to make a simple game but stumbled upon a lil problem .
So i have a cube that will be the caracter controlled by the player, a ball (i will update the shape) that will be the crosshair and a cannon(the blue object :D) that will move the same time with the cube. SO WHATS MY PROBLEM? YOU’D SAY! i need a script (or better a tutorial, cuz i:m quite new to te Game Engine) that will make the crosshair (ball) move using mouse movement and another one that will make the cannon rotate to the position of the crosshair(ball). Thanks in advance! Iattached my blend file…
All I can see is that you’re using Keyboard logic bricks on the main part and they’re working as they’re supposed to (it’s moving). So there’s no problem with that.
I think I know your problem and I have a solution: maybe you should spend some time searching Google, Youtube and these forums which contain more resources than you can imagine… :yes:
–
Crosshairs are implemented through overlay scenes (hint: Scene actuator). Here’s a tutorial. The reticle can either be a mesh or a simple plane with an alpha texture.
This is a tutorial for Mouselook with the script and everything.
Sorry but that didnt helped… I want the crosshair(ball) to move up, down,left,right when you move the mouse. And the cannon to rotate to the direction of the ball…
EDIT: oh…do you mean that i should use a python script? This i why I posted so someone give me or redirect me to the script… I do not have any knowledge of python programing
Oh! one more problem. I can’t figure out how to make the cannon move with the character (cube) (just like the cannon would be mounted on the cube)! I tried to use logic brick but it keeps mooving to the ball position…
EDIT: I used a parent logic brick but when i rotate the cube the cannon isn’t pointing at the ball anymore… I stil want the cube to be able to do the same movement as in the original game.blend file…