id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Models and Animations => Topic started by: The Happy Friar on July 31, 2019, 10:04:23 PM

Title: AR-15 test model I'm working with
Post by: The Happy Friar on July 31, 2019, 10:04:23 PM
my goal is to make the weapon more "real", so I've been messing with some code, script, & model setup's to achieve that.
currently the weapon is setup so that when you start with it, you're not to accurate, but once you hit the target X times (forget how many), you become more accurate.
the idea being the more the player practices @ the range, the better they get.
currently there is no "fire by the hip" option because that's not how I shoot, so it seems unrealistic when trying to hit a target.I might make one where you're just holding the firearm, but you can still pull the trigger & fire to the side.
Title: Re: AR-15 test model I'm working with
Post by: bitterman on August 03, 2019, 12:49:19 AM
It reminded me the hit maps in Q4:

https://modwiki.dhewm3.org/Texturing#q4-hit-maps (https://modwiki.dhewm3.org/Texturing#q4-hit-maps)

Perhaps source code from Q4 can help for your research.

Can you show the model?
Title: Re: AR-15 test model I'm working with
Post by: The Happy Friar on August 09, 2019, 09:31:07 PM
what specific you want to see of the model?  It's not my model, it's a really low poly test model I got from blenderartists.
Title: Re: AR-15 test model I'm working with
Post by: The Happy Friar on August 11, 2019, 12:55:17 PM
issue i'm having now is that the bullet doesn't have slowdown so i can't get the bullet to drop properly.  :)
Title: Re: AR-15 test model I'm working with
Post by: bitterman on August 12, 2019, 11:26:18 AM
what specific you want to see of the model?

For better motivation, I suppose :)

Quote
you're not to accurate

Are you used 'launchFromBarrel" feature and few animations with shaking gun for that purpose?

Thanks.
Title: Re: AR-15 test model I'm working with
Post by: The Happy Friar on August 12, 2019, 01:59:23 PM
Yes.  I modified the code to actuality fire from the direction barrel.  By default it would fire from the barrel at the player's view angle vs the direction of the barrel bone.
Code: [Select]
            //dir = playerViewAxis[ 0 ] + playerViewAxis[ 2 ] * ( ang * idMath::Sin( spin ) ) - playerViewAxis[ 1 ] * ( ang * idMath::Cos( spin ) );
            //use actuatly angle from muzzle bone vs player for firing direction   THF 2019/6/1
            dir = muzzleAxis[0] + muzzleAxis[2] * (ang * idMath::Sin(spin)) - muzzleAxis[1] * (ang * idMath::Cos(spin));
just change the first commented out stuff on the weapon.cpp to the new code.  Surprisingly easy.  I've done tests too, and having different firing animations I can actually change direction of fire now.  Pretty cool.  :) 
Title: Re: AR-15 test model I'm working with
Post by: bitterman on August 12, 2019, 10:10:12 PM
Rocket science :)

My old experiments with optical distortion (can be combined with gun model).
Title: Re: AR-15 test model I'm working with
Post by: The Happy Friar on August 18, 2019, 05:37:07 PM
list=PL87A443F762A27843&index=20&t=0s
using a target_setinfluence to place the players view at a camera which follows an entity & an animated model is spawned at the point of the camera.