Character to Vehicle animation and then controlling the vehicle.

Ive been searching for about 3 days now so im just gonna cast my line out there. I am looking for a way in blender game to get the Character to enter a vehicle and then control it. I saw another guy post on this site and he explained it the best when he said “GTA Style” or my own reference (more closely what im going for) Battlefield 3. Multiple Vehicles that a character can control by going up to the vehicle and getting in it with one button. I am new to blender game. Ive been modeling for a minute but i’d like to take a stab at this. If all goes well I will make a video tutorial explaining what is being done from what I learn here. Cause literally i can’t find anything out there that is step for step on how to do it. If you know of any, im all ears. Literally i will need step by step. If you even want to record your desktop to show how its done, you don’t have to even talk. just record it and post please. I’d like to see the breakdown. :spin:

I think it’s pretty easy to do.

  1. Only the collision mesh (which is the Parent of the Armature) is Dynamic and not Ghost in normal circumstances.
  2. With a key press circumstances will change when the collison mesh is detected by a ray or collision object on the Car’s door.
  3. Parenting the Object to the Car or a child of the car with option to set Ghost, at the same time disable all controls on the Player.
  4. Actions and positioning script positions the character on the car seat, door closes and enable all controls on the Car.

in this game this is how I do it…

Ok, so I would have a “empty” that is your player, have a player model that is invisible, or on another layer, that is your “driving player” and another that is your “walker”,

getting in, turns the “driving model” visible, or spawns it and parents it, and deletes all the pieces of “walker”, or turns them invisible for the player, and moves him to a stock " exit position/orientation" so when you “get out” he is in the right spot

as to controlling the car, you can have a “On switch” like this

property-On=TRUE-------------and--------------Do something
keypress X-----------------------/

and then somewhere have

message or collision ------------and------------property On=True

to turn the controls on and off for the player/vehicle

If anyone is interested. Here’s an example blend.

Attachments

Driver10.blend (139 KB)