Hi,
What the best method to detect the player(node/mesh) attack ?
Im using md2 models.
What the logic used to detect when the player attack other ?
Can anyone help me?
How to detect a player attack
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
I used the bounding box of my characters sword, and checked it against the bounding box of the enemy object. You could make the weapon bounding box bigger and check if the enemy position is in the box as an alternative. But if you're checking for bullet hits I havn't gotten to projectiles yet so I wouldn't know.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Yeah, i think it, check the bounding box of sword, but the sword is built with the player model (md2), can i take only the sword?
How you do to attach wepaons at the model hand? What the technics is used?
Can you explain to me how to attach the sword or weapon and get a bounding box of this sword/weapon in md2?
How you do to attach wepaons at the model hand? What the technics is used?
Can you explain to me how to attach the sword or weapon and get a bounding box of this sword/weapon in md2?
Hi,
you could keep character and sward separated, just using same pivot at models and synchronized animation frames.
But, why not just test the distance between nodes? I think you dont need collision in this case, if an node atack and distance from another node is < 18 (for example) you got a hit.
Sorry for my bad engilsh!
you could keep character and sward separated, just using same pivot at models and synchronized animation frames.
But, why not just test the distance between nodes? I think you dont need collision in this case, if an node atack and distance from another node is < 18 (for example) you got a hit.
Sorry for my bad engilsh!
Well You need to attach the sword to character's palm joint and make it sword's parent, so it can share rotation and location. Then you can check sword collision with other characterprchakal wrote:Yeah, i think it, check the bounding box of sword, but the sword is built with the player model (md2), can i take only the sword?
How you do to attach wepaons at the model hand? What the technics is used?
Can you explain to me how to attach the sword or weapon and get a bounding box of this sword/weapon in md2?
@Daniel FF
The problem is not to check is to determine when the player is in attack mode, i think that i can by the frame number, but it a poor implementation, so i prefer the colision with sword.
@Murloc992
Humm ok.
You have a joint tutorial or demo that i can check how to do it with player and weapon?
The problem is not to check is to determine when the player is in attack mode, i think that i can by the frame number, but it a poor implementation, so i prefer the colision with sword.
@Murloc992
Humm ok.
You have a joint tutorial or demo that i can check how to do it with player and weapon?