I have setup 3 cubes and a camera ,the camera has 3 set frames on the timeline that move to each of the 3 cubes.

what i want is to be able to use the scroll wheel of the mouse in BGE and toggle between thoughs 3 frames.

how can this be done?


Use a mouse sensor to run an action. In the action actuator you can specify the start and end frame to play. You will need a property to track where you are and run a different part of the action for each value.

Personally I wouldn't use the action keyframes, I would use a simple motion for the camera.

enter image description here

When a mouse wheel up event happens and the location property is less than 4, the camera is moved 10 units on X and adds 1 to the location property. Simply repeat for the opposite direction.

  • $\begingroup$ Ok here is my problem with what you said i tried following based off your picture and i dont know how to get the location property you have. $\endgroup$ – sketcherskt Apr 17 '15 at 2:55
  • $\begingroup$ can you please or someone else explain this further? $\endgroup$ – sketcherskt Apr 17 '15 at 2:56
  • $\begingroup$ location is a game property, you can add game properties to the side of the logic editor, if the properties aren't visible press N $\endgroup$ – sambler Apr 18 '15 at 14:44
  • $\begingroup$ yes but all i see is timer,string ,float,integer,boolean $\endgroup$ – sketcherskt Apr 22 '15 at 3:35
  • $\begingroup$ so is there suppose to be more like location? $\endgroup$ – sketcherskt Apr 22 '15 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.