Search Unity

Assets Renegade Project [DriverN Shooter system]

Discussion in 'Works In Progress' started by dibdab, Aug 4, 2017.

  1. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    also added velocityControl
    (calculates velocity and angular velocity of bodyparts)
    velo01.gif velo02.gif
     
    Neviah likes this.
  2. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    now I use the lerp system for getups too
    getup2.gif
     

    Attached Files:

    Last edited: Feb 11, 2019
  3. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    also jump to hang
    without and with height adjustment (with animationcurve)
    jumph00.gif jumph01.gif
     

    Attached Files:

    Last edited: Jun 6, 2018
  4. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    climbup in 3 stages
    climbup.gif climbup.png
     
  5. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    added jump/fall-grab to climb-up and another type of jumpover
    fallgrab.gif jumpover4.gif

    had thought that would be good if system would determine which type of jump is ready to execute
    but that would/might cause conflicts so each jump will have a key(-combo) for now
    still w.i.p.
     
  6. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    same thing with backflip
    (notice the different distances)
    jumpflip.gif

    and testing impact on objects
    jumpflip2.gif
     

    Attached Files:

    Last edited: Feb 11, 2019
    Neviah likes this.
  7. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    experimenting further with jumps and falls

    here it look like it doesn't go ragdoll because the foot collider doesn't touch,
    it's the capsule that capsizes it (because that's a regular jump)

    jumpimpact2.gif
     

    Attached Files:

    Last edited: Feb 11, 2019
    Neviah likes this.
  8. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    had a bit of work with this.
    checks cWalker state and jump anim-event sets the range when can the collision happen
    jumpimpact12.gif
     

    Attached Files:

    Last edited: Feb 11, 2019
    Neviah likes this.
  9. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    this is why I wanted to include that mixamo jump
    though it's hard to get is right
    jumpoverhood1.gif

    this happens when not so good
    might need to project the ref man a bit further
    jumpoverhood0.gif
     
  10. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
  11. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    small update
    added 180 to walk/run backwards
    \\

    updated the webdemo too [use numpad keys 1-3 when walking/runnin]
    https://rawformula.itch.io/renegade-098


    it's possible to add 45/90/135/180 turns to any animstate, but needs animations for that
     

    Attached Files:

    Last edited: Feb 11, 2019
  12. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    ever since I found out that blend-trees within blend-trees is a better way for doin walk-jog-run
    wanted to redo the locomotion with that
    it has some drawbacks as opposed to transitions between animation states like can't be previewed and needs matching animations
    had some problems along the way, got it workin
    needs some fine-tuning, but pretty much final
     
    Last edited: Nov 25, 2018
  13. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    added foot tracking (with anim curves) and fade to stop on foot value
    the transition from runstop to locomotion is better now too
     
    Last edited: Jan 30, 2019
  14. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    compared with animator.pivotweight
    Code (CSharp):
    1.     public float feetxF;
    2.     public float feetx;
    3.  
    4.  
    5.     feetx = animator.pivotWeight;//feetx>0.5f :right; feetx<0.5f :left;
    6.     feetxF = (0.5f-feetx)*2;     //1:left; -1:right
    that is the lower feet indicator
    run.gif

    I don't know why she's slower, maybe because her feet are shorter :)
     
    Last edited: Nov 27, 2018
  15. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
     
    Neviah and manpower13 like this.
  16. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    now literally takes one minute to set up a walking-running character

    it was working with 100 lines of code, but 1500 lines it took to get it where it is now

    input values
    acceleration curve > xacc
    decceleration curve
    sideway movement curve > hxc
    run direction curve > rdx

    input.jpg
     
    DrOcto and FusionSticc like this.
  17. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    workin with mixamo's melee pack

    looked at how it would feel to control attacking with blend-trees
    might be doable with variations to the input/animator-parameters
    swordBTez.gif
    but still the oldschool way is the most dependable
    swordMez.gif
     

    Attached Files:

    Last edited: Feb 11, 2019
    Neviah likes this.
  18. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    now usin statemachines
    the design looks like this
    statemechines.jpg
    the sword sm
    sm_sword.jpg
    it's not adviseable to use states with same names.
    best for all to have unique name even in different state machines
     
    Neviah likes this.
  19. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    working on clashing swords
    this was giving me some time
    it is a bit more complicated than fighting
    clashswords2.gif
     
  20. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    also wanted to always try this
    carflip4.gif

    yes there is collision detection
    carflip3.gif
     
    manpower13 and Neviah like this.
  21. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    now using penetration to determine sword damage lethalness
    clash1.gif

    also new riding shotgun animation
     

    Attached Files:

    Last edited: Feb 11, 2019
    Neviah likes this.
  22. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    one observation

    a thing that has been bugging me long
    when shooting at the car, after a while it starts to behave irrationally

    it's because force app point distance increases
     

    Attached Files:

    Last edited: Feb 12, 2019
  23. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    vehgun2.gif
     
    Last edited: Feb 12, 2019
  24. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    new blocks and stabs
    blocknstab.gif
     
  25. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    2 type of projectiles on one weapon
    projectilesx2.gif
     
  26. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    added controlling a gun not in hand
    shootinmach.gif
     
    Neviah likes this.
  27. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    and rpg
    rpg.gif
     
    Neviah likes this.
  28. Ceciphar

    Ceciphar

    Joined:
    Jan 21, 2017
    Posts:
    51
    Do you have a twitter?
     
  29. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    no, but plan to do youtube videos to showcase the features

    ____
    added flamethrower
    flamethrow.gif
     
    Neviah likes this.
  30. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    no big advances since the last time, had to battle a tsunami of bugs
    while doin improvements and simplifying in the process

    let me show you the neatness of minCollVelocity

    if set to 9, fallin over 3.9 meters means ragdolling
    (colliding with anything, over this minimum collision velocity)
    mcollvelo.gif
    and no ragdollin if below
    mcollvelo0.gif

    idea: adding collision sound volume by velocity
    (or array of sounds chosen by velocity ranges)
     
    Last edited: Feb 21, 2019
    Neviah likes this.
  31. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    using the same lerp system as #52
    but I think was usin ragdoll colliders on the same skeleton then (rb istrigger / usegravity)
    and I wanted to separate ragdoll and renegade
    which made the things a bit more difficult but got there
    getup1.gif
     
  32. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    first footage of two actors in one car
    driveby1x.gif
     
  33. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    in real life you can rotate a steering wheel by 1 degree or 40 degrees in same length of time
    now reworking the steerin so it can do that
    with a push of a button changing from slow steering (low degrees) to fast steering (high degrees)
    steerinwheel.gif
     
  34. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    211
    when you think is the release date?
     
  35. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    hope to get all things set this week.
    that means driving, shooting, fighting, swordplay.
    these should work for the first release.

    and will have to make prefabs, demo scenes and documentation.
     
    Neviah likes this.
  36. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    Where did you get your inspiration for creating this system?
     
  37. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    phew that's a hard question. I always wanted to have a character controller that's kinda universal. I know the general advice is to make it specific, though...

    this driving on two wheels happened accidentally first time, was curious if can do it again
    twowheels03.gif

    couple things I did in in the last few days related to vehicle enter/exit:
    weapon ignore coll on triggerEnter
    set window low on enter
    automatic getIn
    store weapon on enter
    change IK when pulling/storing gun
    haltInput
    explosion effecting actors in the vehicle
     
  38. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    just recently found out that Deucalion's Humans contain a couple usable fighting animations too

    there's also a
    CC Attribution-ShareAlike 3.0 licensed Mocap Database HDM05
    which I could make some of them somewhat okay, but they don't look as good as the bvh (at least in fragmotion)
    the problem is that the default T-pose looks opposite direction as the animation
    and the result is a mess

    had some converted to bvh and put them up here
    http://www.mediafire.com/file/fu0gf1ic1n72vdw/hdm5_bvh.zip

    if someone could rescue these animations that would be great.

    note: the fps is 30 in bvh, originally 120
    (can be set to 120 in fragmotion)


    ______________________________________

    there's also another share-alike licensed animations from mocapdata.com
    http://mocapdata.com/Terms_of_Use.html

    which I used in the Fighter project and plan to make those available for download for Renegade
     
  39. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
  40. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    Batewar's bodyGuard and mixamo's Liam
    bodyguard.gif liam.gif
     
  41. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    there is
    23 type of buildings and 70 buildings in the scene
    Clipboard03.jpg
    the buildings consist of 3 objects: walls, roof, glass.

    if want to use glass shattering, the glass should be separate object for every window (this might be best to switch to separate in-game when bulletscript registers glass)
     
    Last edited: Mar 9, 2019
  42. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    Actually can't wait to buy this
     
  43. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    hey, thanks. I needed this.

    it's coming.
     
  44. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    the weapon collection

    (the ones on the left not set up yet)
    weapons.jpg

    until there's no better, I'm using the minigun with the flamethrower animations
    minigun.gif
     
  45. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    some notes on holding (with using mixamo anim)

    hands1.jpg
    hands2.jpg
     
    Last edited: Mar 10, 2019
  46. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    okay, I just realized it won't be so easy just to use lHand ik
    since the mixamo animation has the lefthand already posed
    (and fade in and out the ik when going to idle etc)

    so it's better just to pose gun to match (and not use lefthand at all)
    looks like this
    cmc.gif
     
    Last edited: Mar 10, 2019
  47. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    added rotation and position lerping to the camera script
    camgetinout.gif
     
  48. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    so the default characters will be these
    defchars.jpg
     
  49. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    this is how you create a Renegade actor
    1. make your model humanoid and create a ragdoll
    2. duplicate
    3. assign them in the createRenegade prefab
    create4.jpg
    4. press play and copy the character gameobject
    5. stop play and paste character into the scene
    6. add the controller to the animator
    create7.jpg
    7. assign the renderers for the renegade and the ragdoll (since they can be any number)

    and that's it. the character should move now.


    should check the boundx positions, weapon positions because every skeleton has different height/rotations, so these might need a bit of adjustment.

    also the ragdoll's middle spine
    can be the spine or the chest bone of the humanoid rig (it can be missing if you have an irregular skeleton or both can have colliders if you do manually), that's why there's the useColl Spine/Chest checkbox
     
  50. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    848
    Renegade was submitted on Sunday


    let's go through some things that was done

    first theres the issue of lefthandIK, which
    had to be be faded out when using locomotion animation while holding a weapon

    added stateMach variable which tells which statemachine are we now
    statemach.jpg
    and this piece of code takes care of lefhandIK while not in handgun statemachine
    Code (CSharp):
    1. if (states.gun && weapon.weaponData.use.lHand){
    2.  
    3.                 if (weapon.weaponData.animstate == "handgun") {
    4.  
    5.                     if (stateMach == "handgun") {
    6.                         if (comp.ikControl.weights.lHandP == 0) {
    7.                             comp.ikControl.FadeInLH (2f);
    8.                         }
    9.                     } else {
    10.                         if (comp.ikControl.weights.lHandP == 1) {
    11.                             comp.ikControl.FadeOutLH (1f);
    12.                         }
    13.                     }
    14.                 }
    15.  
    16.     //etc.
    but there are the weapon animations which can be dual-handed or one-handed, ie. mixed
    and for these
    1. will have bools which indicate which anim is dual-handed
    or 2. will have a separate dual-handed animationstate for each one