Entering vehicle help

Hey guys i was just wondering how would i parent my character to the center point of an object, kinda like if i moved a cube close to a sphere and pressed “A” the cube would be sucked into the spheres center point. In other words snapping the cubes center point to the spheres center point thus being parented. Any idea on how to do this? or is there another way to make a character enter a vehicle and change to vehicle state?

you could us an empty at the position you want, and parent the driver to this empty. Like this yo can test in 3D View, if the position ist correct.

that doesnt really work either because when i walk up to the vehicle and press a, the character doesnt really snao to its right location that i want it to. Is there another way to do like in halo entering ghost of like in gta entering vehicle?

This is quite komplex and most likely a lot of work:

  1. deactivate the manual controls of the object
  2. let your object move to the entry point
  3. let your object perform the start pose of the enteranimation
  4. play the enter animation
    5a. parent the object to the vehicle or
    5b. replace the object with a object in the vehicle that is already parented
  5. activate the manual controlls of the vehicle

Tips:

  1. work with states
  2. trackTo and motion and near sensor/collision sensor
  3. trackto actuator and delay sensor
  4. Action actuator with frame counter + property sensor
    5a. parent actuator
    5b. edit object actutaor addObject/end
  5. work with states

I’ve been thinking about this for my game. What I came up with is to just parent you character to the vehicle, turn him invisible and into a ghost, and make an already parented character inside the car visible.