4 questions 4 my game

Hi there! I’m trying to put a simple game together and I have four questions. Please help.

  1. Is there a way to make my object return to it’s original (starting) zero rotation? Say if it was a steering wheel would it be possible to make it return to the starting position (i.e. car going str8) when no key is hit (not trying to turn)? I’ve tried creating an empty object and use the track to actuator for the object i want to get back to it’s original position (using the empty as a track object) but when I hit P my object falls to infinity… Am I doing something wrong or is it a bug? If there is no way around this one could I use a key (hit) to make my object return to it’s original (starting) rotation values (zero)?
  2. There is a constrain actuator but it seems it can only work for position. How could I constrain the rotation of an object (say limit the rotation to 45 degrees for any direction)?
  3. Is there a way (or script) I could use to calculate the speed of an object (and perhaps be able to use it as a property)?
  4. I’ve also seen some Blender-made games giving you the option to select the display res of the game (one of them even changed it’s proportions to fit to my 16:9 display). How can it be done? Is the Game-> Generate Display Lists option has something to do with it?
    Warning: I have absolutely no coding experience (that’s one of the reasons I love BGE)
    Thank you in advance and sorry for my bad English (I’m from Greece). Demo of this game will come pretty soon!

For the steering wheel, I’d use an IPO animation.

For the others Python will probably be required.

Thanx PlantPerson! I kinda thought this solution too but it would be almost impossible to ‘guess’ the rotation of the object when no key is hit to record an IPO that takes it back to the zero rotation position. I’ll give it a try.

Someone made a tutorial on turning the wheels side to side, but I can’t remember who did it or find the tutorial (so sorry for not giving credit to whoever came up with the idea.) But you basically add 2 empties where your steering wheel is, parent the wheel to the first empty, and then parent that empty to the second one (which would be parented to your car). Use an ipo to animate one empty turning left, and the other turning right. Finally, use ipo actuators set to flipper with the keyboard sensor on True pulse mode. You’ll need to do that for each empty. Good luck with your game.

Sounds promissing… I’ll give it a try. Thanx!:slight_smile: