![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Oct 2009
Posts: 11
|
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. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Dec 2007
Location: charleston, west virginia
Posts: 996
|
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. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Oct 2009
Posts: 11
|
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. |
|
|
|
|
|
#4 |
|
DevMaster Staff
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,709
|
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. |
|
|
|
|
|
#5 |
|
New Member
Join Date: Oct 2009
Posts: 11
|
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. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|