Quote:
Okay, so I henceforth conclude arguing on the basis of mutual benefit through forgiveness. Though arguing can create strong debates and lead to the passion of challenge, growth is best found when sought by a whole.
Ok?
Anyways.
Quote:
1. The guy needs to move (blender can easily manipulate coordinates), and that shouldn't take too long.
Then it shouldn't take long to figure it out in Python if you know the language. Normally you have an up, right and look vector. Moving along the look vector equates to walking forward and backward. Moving along the right vector equates to strafing left and right. Moving along the up vector equates to flying up or flying down.
Quote:
2. The guy is gonna need to shoot. I know how to get the barrel fire, but I have no idea how to have the bullet land where he is aiming.
This is a simple vector operation. You can do this several ways. One way is to raycast the bullet instead of having it become an actual object in the world. The raycast is the simple parametric form of a line or P(final) = P(origin) + shoot_vector * distance. Normally you could use the shoot vector to perform a ray intersection test with the bounding volume of your object. Once that passed you would then do a triangle intersection test on the mesh itself to see which ray the triangle hit. Once you computed that you would then compute the barycentric coordinates of the ray intersection within the triangle. From there you would then fire off some type of 'hit' message which would then deduct health, etc.
Quote:
3. The camera angling will be parented to his gun, and that needs to be controlled by the mouse. Again I have little idea, but I think my friend might be able to help with that.
In an engine this is handled by the camera class. The player's gun is pointing down the look vector of the camera. To translate the gun to the correct world position you would have a vector in local space that represented the location of the gun relative to the local origin. Then you would multiply the inverse world transpose matrix of the object with the local translation matrix of the gun to move it to the correct location.
Quote:
4. I will need enemies who shoot back. There I am utterly clueless.
Enemies will have to 'rotate to face' your player and fire. The rotation can be done via quaternion slerp or it can be done via euler angles and axis-angle rotations. To do this you first find the up vector. This can be done by creating a ray from the player to the target and crossing it with the player's look vector. This will give you the up vector relative to the current player orientation. Once you have this you compute the dot product between the look vector of the target and the ray to the player. This is the amount of rotation or the angle of rotation you will need. All that is left now is to find the axis of rotation - which just happens to be the up vector. So if you rotate (target.look dot rayToTarget) about the up vector you just computed you will snap to or rotate to the player and vice versa. To smoothly rotate you linear interpolate between the current vector and the target vector you just computed. Once this is done you can set a flag that the target is now ready to fire. You fire the gun of the target at the player and use the bullet calculations I provided above in the previous answers. To add some randomness you would add a vector offset to the actual vector to the player. The offset would be a direct representation of the accuracy or skill level of the attacking object.
Quote:
5. And I need to do health, witch will be easy with Python.
Health can be done via simple scalars. Reduce the health on hits by a constant amount or by an amount based on which bounding volume of the player was hit. The head bounding volume would obviously reduce or completely eliminate any health thus killing the player. Other bounding volumes would have a lesser damage amount.