cars in a fps

ok im making a fps game and it will have vehicles in it so i was wondering how i 1. get in the vehicle and 2. move while in the vehicle.

tips: you can move around normally

Ok, let me explain something here, there is not engine that knows how to do what you just said, you have to do it yourself, what I would suggest is to make a .blend of your character, get him going really well, then make a .blend of your car. Then just figure out a way to make a transfer between the two, there is no magic way to do this, and nobody is going to spend a few hours writing out in detail how. First make the two run well away from eachother, then worry about putting them together. By that time you may know enough about the bge to know how to go about doing that.

Good luck to you on your project, but there is really no simple solution to doing what you asked.

Well… You could move your character to another layer than make an empty that spawns you character in the beginning, and then make it so that when your character goes up to the car and presses a button, the character object is ended, and the mesh for your car is replaced. The new mesh should have a dude in it. Then, set up your car with the vehicle wrapper. Then, make an empty by the side of your car, parent it to the car, then make a keyboard sensor (the key to get out) make the mesh for the car switch back and the empty spawn the character. Viola.

Google anything you don’t get. You should be learning, here.

When you are near the car and press a key, have the player change to a state where all physics are disabled, and have the car change to a state where controls are enabled. Write a python script to place the player object in the car and parent it. Switch to the car’s camera.

Now if you’re in the vehicle and you press the button, remove the parent, set the player’s position to outside the driver-side door, switch to the player camera, and change the player state to physics enabled and disable control of the vehicle.

Shouldn’t really be too hard if you can script.

Here’s an example of what I meant. arrows move, space enters and exits the cars. You have to be on the left side of the car to enter.

Oh, and I didn’t give the cars steering, just forward and reverse, but you can find plenty of help for that if you need it.

Here’s the .blend: http://www.box.net/shared/4ia9rkni76

Oops! Forgot about switching to a controlling state for the car! Thanks, Magnum!

thnks everybody and magnum when i tried to do that all but on my guy nothing happened except the car was moving while the player was think you can tell me what i did wrong?

post a .blend

Sounds like the car switched to the active state, but the player didn’t switch to the inactive state. Check for errors in your script and logic bricks.

Did the position and parent parts of the script work? If they did, and the player is moving relative to the car, then it’s a problem with your states. If those parts didn’t work, then there must be an error in the script. Check the console after you run the game.

its to big to post