Author Topic: AR-15 test model I'm working with  (Read 3082 times)

0 Members and 1 Guest are viewing this topic.

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,031
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
AR-15 test model I'm working with
« 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.

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: AR-15 test model I'm working with
« Reply #1 on: August 03, 2019, 12:49:19 AM »
It reminded me the hit maps in Q4:

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

Perhaps source code from Q4 can help for your research.

Can you show the model?
« Last Edit: August 03, 2019, 12:53:09 AM by bitterman »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,031
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: AR-15 test model I'm working with
« Reply #2 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.

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,031
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: AR-15 test model I'm working with
« Reply #3 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.  :)

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: AR-15 test model I'm working with
« Reply #4 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.

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,031
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: AR-15 test model I'm working with
« Reply #5 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.  :) 

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: AR-15 test model I'm working with
« Reply #6 on: August 12, 2019, 10:10:12 PM »
Rocket science :)

My old experiments with optical distortion (can be combined with gun model).
« Last Edit: August 12, 2019, 11:58:18 PM by bitterman »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,031
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: AR-15 test model I'm working with
« Reply #7 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.