Hi,
I'm wanting to understand how characters operate, the generally accepted model types, interaction, etc. I have ideas but would like to know what the pro's say:
- Which best character models to use, especially to be able to attach different weapons.
- How to attach different weapons.
- How to track weapons and test for zone of impact (on another character)
- Change how character looks physically and by maps... which type is best.
Theres a million more questions, but for now Cheers...
Character Interaction
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
(Please be gentle, chaps. This isn't answered in any FAQ, so RTFM will not be much help.)
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
To attach weapons nicely you'll want to use a model format that supports skeletal animation (such as .X, .B3D or .MS3D).
Attaching weapons is as simple as loading the character model, grabbing the necessary bone in its hand, loading the weapon model and then setting the weapon node's parent to be the bone, it will then follow the hand.
To detect if a weapon like a sword has hit a character you could do something as simple as grabbing the bounding box of the character and then creating a 3D line from the hilt of the sword to the tip and then seeing if that line collides with the character's bounding box. If it does then you could go on to do more expensive and complex collision detection based on triangles of the character's model or something, if that was necessary.
Attaching weapons is as simple as loading the character model, grabbing the necessary bone in its hand, loading the weapon model and then setting the weapon node's parent to be the bone, it will then follow the hand.
To detect if a weapon like a sword has hit a character you could do something as simple as grabbing the bounding box of the character and then creating a 3D line from the hilt of the sword to the tip and then seeing if that line collides with the character's bounding box. If it does then you could go on to do more expensive and complex collision detection based on triangles of the character's model or something, if that was necessary.
Thanks, i'm just looking into b3d now, even though i'm telling myself i'll finally get a copy of milkshape (always had probs with blender export with .x and .md2).
I found a reference to:
IAnimatedMeshSceneNode
Not that i'll follow this next path, but it concerns md2:
a post
Cheers
I found a reference to:
IAnimatedMeshSceneNode
Not that i'll follow this next path, but it concerns md2:
a post
Cheers
i think for animated characters to be use in games, milkshapre is bestdelark wrote:Thanks, i'm just looking into b3d now, even though i'm telling myself i'll finally get a copy of milkshape (always had probs with blender export with .x and .md2).
I found a reference to:
IAnimatedMeshSceneNode
Not that i'll follow this next path, but it concerns md2:
a post
Cheers