About Store Forum Documentation Contact



Post Reply 
Vehicle (Enter, Exit problem)
Author Message
FireMan Offline
Member

Post: #1
Vehicle (Enter, Exit problem)
Hi. I make car. I want to do input and output to the car. Here is the code input / output:

Code:
if(Dist(Players[0].pos(),car.pos())<=2)
   {
       if(Kb.bp(KB_F))
       {
           Players[0].pos(car.pos());
       }
       if(Kb.bp(KB_G))Players[0].pos(car.pos()+Vec(2,0,2));
   }
I want to do that as a player in the car and click on the button F, then gets into the car and say the figure does not visible, and appears just behind the bumper car (Vec (5,0,0)). How to do this so the player was still in the car and he was invisible?. And as a player clicks a button that appears G in position (Vec (2,0,2)) and is visible. If i write no understand please tell me smile

Forum reklamowe: http://ad-forum.pl
12-30-2009 07:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Vehicle (Enter, Exit problem)
you shoud disable collisions between player actor and vehicle actor, you can also consider using Joint to link them, if not you must manually set the character position each frame at the vehicle position
12-30-2009 10:02 PM
Find all posts by this user Quote this message in a reply
FireMan Offline
Member

Post: #3
RE: Vehicle (Enter, Exit problem)
Ok. I set the cam pos, but i don't can attach player to car pos. How make it ?

Forum reklamowe: http://ad-forum.pl
12-31-2009 02:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Vehicle (Enter, Exit problem)
chr.pos(vehicle.pos())
12-31-2009 03:47 PM
Find all posts by this user Quote this message in a reply
FireMan Offline
Member

Post: #5
RE: Vehicle (Enter, Exit problem)
(12-31-2009 03:47 PM)Esenthel Wrote:  chr.pos(vehicle.pos())

Yes, but player does not follow the car only appears in place of the car and falls to the ground.

//EDIT:

Ok i make it thx for helpsmile

Forum reklamowe: http://ad-forum.pl
(This post was last modified: 12-31-2009 05:50 PM by FireMan.)
12-31-2009 04:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply