Hi,
on a 3rd person game, how to make the main character child of a car, and than get the car control (pressing the use key). Like we see in vice city .
plz help
thnks
Child Node
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Child Node
Do you really expect people will code that for you?
is very complex.
The Irrlicht part is
or
Code: Select all
player->useItem(car);
The Irrlicht part is
Code: Select all
ISceneNode::addChild(ISceneNode *child)
Code: Select all
ISceneNode::setParent(ISceneNode *newParent)
"Whoops..."
-
- Posts: 20
- Joined: Thu Nov 05, 2009 11:36 am
-
- Posts: 20
- Joined: Thu Nov 05, 2009 11:36 am
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
-
- Posts: 20
- Joined: Thu Nov 05, 2009 11:36 am
you have some code for a camera right? it should depend on a target ISceneNode, which is initially your player. So when the player "uses" the car, you change the camera's target to the car. And in your event handler, you figure out whether the player's in a car, and move the appropriate node, either the car or the player.
If that plus the other replies aren't enough to help you, you probably need to get your hands dirty and write some code, then come back here when you have a more specific, technical question. We won't write your game for you.
If that plus the other replies aren't enough to help you, you probably need to get your hands dirty and write some code, then come back here when you have a more specific, technical question. We won't write your game for you.
-
- Posts: 20
- Joined: Thu Nov 05, 2009 11:36 am
Srry, I already solved that problem before posting the above reply. my head just got meshed up, i was almost forgot that this problem was solved . i m designing a building for my game (1st level) and u know how dirty it is to design a building with interior decoration in a 3d modeler.
srry again .
srry again .
I Hate Those, Who Like To Sleep.