playMaker

Author Topic: Help Switching Controller/Camera when getting in and out of car  (Read 1143 times)

Mangledmind

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Help Switching Controller/Camera when getting in and out of car
« on: January 23, 2013, 04:08:42 PM »
Hello guys, ive recently setup a simple system in PM that will allow a player to get into a vehicle when hes close to the driver side car door and presses the correct button. (atm it's all just visuals) he gets in, assumes his seated position animation, and follows/stays with the car perfectly.

what i need help with is changing the controls so that when he gets in, the play no longer controls the characters 3rd person commands, and instead runs the vehicle driving commands. (and have the camera scripts change to follow suit.

thank you for your help. when i get the whole thing finished i plan on upload some sort of tutorial, or at least a bunch of screen shots so people can mimic it to get a simple setup done.

(to clarify, i dont need any of the actual scripts for commands, i just need help transitioning between the them)
« Last Edit: January 23, 2013, 05:03:54 PM by Mangledmind »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14342
  • Official Playmaker Support
    • View Profile
Re: Help Switching Controller/Camera when getting in and out of car
« Reply #1 on: January 24, 2013, 07:07:47 AM »
Hi,

 you can simply destroy the gameObject responsible for controlling, and reinstanciate it when you are back.

so as you get in the car, you destroy the character and replace it by a dummy doing nothing ( maybe turning his head and turning the wheels, and you instanciate the gameObject responsible to contorl the car.

does that make sense?

bye,

 Jean