DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Artificial Intelligence
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-05-2009, 07:08 AM   #1
Isoprog
New Member
 
Join Date: Oct 2009
Posts: 11
Default Is This AI?

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:


Thanks for ur reply,
regards

Last edited by Isoprog : 11-05-2009 at 07:49 AM.
Isoprog is offline   Reply With Quote
Old 11-05-2009, 07:32 AM   #2
starstutter
Senior Member
 
Join Date: Dec 2007
Location: charleston, west virginia
Posts: 996
Default Re: Is This AI?

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.
starstutter is offline   Reply With Quote
Old 11-05-2009, 07:45 AM   #3
Isoprog
New Member
 
Join Date: Oct 2009
Posts: 11
Default Re: Is This AI?

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

Last edited by Isoprog : 11-05-2009 at 07:53 AM.
Isoprog is offline   Reply With Quote
Old 11-05-2009, 10:21 AM   #4
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,709
Default Re: Is This AI?

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.
___________________________________________
Currently working at Sucker Punch
reedbeta.com - OpenGL demos and other projects
Luabridge - a lightweight, dependency-free C++/Lua binding library.
CD Lite - an unobtrusive, minimal CD player application for Windows.
Reedbeta is offline   Reply With Quote
Old 11-05-2009, 11:30 AM   #5
Isoprog
New Member
 
Join Date: Oct 2009
Posts: 11
Default Re: Is This AI?

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

Last edited by Isoprog : 11-05-2009 at 11:36 AM.
Isoprog is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 01:47 PM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.