Jump to content


Is This AI?


4 replies to this topic

#1 Isoprog

    New Member

  • Members
  • PipPip
  • 11 posts

Posted 05 November 2009 - 02:08 PM

Hi there,
I am making a game where the main character will drive a car. It is a 3rd person camera. Lets say, when the character is near a car and player will press the use key ( e.g. "E"), the main character will open the car's door and sit on the drivers sit ( than the character will become child of the car node and, the control will switch from character control to car control, this is not my problem). My problem is, how to let the caracter know that where is the door and he will go and open the driver sides door?

In simple words, if the character is inside the trigger area of the car and player press the use key, how the character will know that where is the door of the car?

Here is what I want to tell u:
Posted Image

Thanks for ur reply,
regards

#2 starstutter

    Senior Member

  • Members
  • PipPipPipPip
  • 1039 posts

Posted 05 November 2009 - 02:32 PM

honestly that part should be fairly easy too. The more sphisticated way to do it would be to have an area defined as the space where the car door can be used, and then have a point defined where the door handle is. When the player presses the Use key, he can turn towards the door handle so that his animated hand will grab onto it and open it. Since this is 3rd person, it doesn't have to be perfect, just close enough so that he doesn't grab solid metal and open the door. If you're going to have different cars of different sizes, you might need to make several animations of opening car doors that adjust to these different hieghts off the ground.
(\__/)
(='.'=)
This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!

#3 Isoprog

    New Member

  • Members
  • PipPip
  • 11 posts

Posted 05 November 2009 - 02:45 PM

Ya, but it is the second step, the first step is, wherever the character is(inside trigger area), he will hv to come near the door by itself. That mean as soon as the use key will be pressed, the character will go to the driver's side door by itself. The control will become something like self control(character node), not keyboard control(human).
BTW, thnks for reply

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 05 November 2009 - 05:21 PM

Have a point parented to the car that represents where the character should be standing to play his "open door" animation, and path the character to that point, using whatever usual obstacle-avoidance system you have for characters walking around.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 Isoprog

    New Member

  • Members
  • PipPip
  • 11 posts

Posted 05 November 2009 - 06:30 PM

Ya, got it. thnks Reedbeta. When, starstutter said animation, was thinking about an animation sequence.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users