Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Controller Renegade Project [DriverN Shooter system]

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

  1. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    TOUCH DEMO
    using this
    https://github.com/pixel-stuff/MobileController

    for now just locomotion

    I could not test this
    I don't know if the buttons work simultaneously (just tested w mouse) let me know if they don't

    issues: sneaking diagonal is not working

    windows demo
    https://www.mediafire.com/file/h24mk3gv47zo6gy/RENEGADE_TOUCH01.ZIP/file

    apk later : android sdk and jdk install didn't work
    will try with a new unity install

    tried w a new install, still complained about jdk not valid, while being installed
     
    Last edited: Mar 16, 2023
  2. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    redoing vehicles into unskinned meshes
    because so the mesh colliders can deform too
    unskinddestruct.gif
    unskinddestruct2.gif
     
    Last edited: Mar 9, 2023
  3. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    now can hangmove on round and bent obstacle
    hangmovepullup2.gif

    to do: what happens if one hand target is missing
     
  4. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    got a request about if Renegade would work mafia style drive-by
    so put it on to-do list
    mafia.jpg

    in first step, now for each enterpoint it's possible to add any number of seatpoints
    seatpoints.jpg getinseatpoints.gif
     
  5. Ekaj_69

    Ekaj_69

    Joined:
    Nov 8, 2021
    Posts:
    4
    Hello, I've been eyeing this asset for several months, I saw that the price was recently reduced so took a stab at it. I have tried to install it on Unity 2017.02.0p2 and 2018.4.8f1 and get the same 10 "Missing Assembly Reference" script errors (attached pic). I see there are several versions available in this forum but can only install 0.96X 2020.03.02. that was for Unity v5.6.7f1. I have downloaded nearly all of the demos previously including extra files and scenes.

    I've gone back through the 12 pages here to compare the numerous updates. I read the package Docs, read the online Google Docs and visited your website to see if there is a fix or if I was missing some files that were not included in this package version. Can you please provide some instructions on how to remedy the errors before I attempt to edit all of the scripts. Advance thanks.

    P.S, these were installed into New/Empty projects and the Input/Tag settings installed as instructed as well as a restart of both projects to see if the errors would resolve.
     

    Attached Files:

  6. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    hi, this looks like an older version, most of these scripts have been redone/not present in new version.
    if the version is 0.96, I don't advise to use that, it's totally different system.

    I'll drop you a private message if you want to use this version.

    (the new 0.99H version should be downloaded with 2021.3.15 or later)
     
    Last edited: Mar 14, 2023
  7. Ekaj_69

    Ekaj_69

    Joined:
    Nov 8, 2021
    Posts:
    4
    Hello and thanks for the quick response. I received your messages and the files. Unfortunately adding them to current project resulted in around 20 new errors. Pretty sure it was because of mixing different script versions. I have installed the latest Unity and will try to download the newest package update tonight. I would prefer a version that works with Unity 2017 as I have a specific target build in mind and have some older projects that I would like to integrate some of the Renegade elements in to. Just Primarily basic locomotion, enter / vehicle, bike and the ragdoll physics with your game pad support. I'm just afraid that if I migrate my project to a newer Unity version it will break other things. I'll correspond additionally with you privately. Thank you.
     
  8. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    the newest version has a Renegade56nAbove package in the main folder, which if imported should overwrite scenes, prefabs and be usable in any unity version since 5.6
     
  9. Ekaj_69

    Ekaj_69

    Joined:
    Nov 8, 2021
    Posts:
    4
    Great, I'll give it a whirl and provide feedback. Thank you.
     
  10. Ekaj_69

    Ekaj_69

    Joined:
    Nov 8, 2021
    Posts:
    4
    Quick update, Renegade56n is working for the most part in Unity 2017.2. Had to remove a few lines in one of the FX scripts initially. Some scenes need additional tweaking (shaders, GP/PC input) but I have access to the build elements now. Thanks for the help.
     
  11. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    now if obstacle moves, hanging can keep in place
    [jumpMX.hang.keepGround.use]

    hangdkeepground.gif

    mostly works, but in at too steep angles, positioning can fail
     
  12. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    fixed a bug w braking
    the problem was basically that brakes input was partly in fixed update,
    so moving it into update resolved it
    tyreburn1.gif
     
  13. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    Ekaj_69 likes this.
  14. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    jumpMX
    [onHangX.fixHands] : fixes transform position to hands while hanging
    (e.g. if hanging height changes)
    hanglegsup.gif
    [hang.useLegs]
    parameter blending (without animation)
    hanglegsup1.gif
    with animation [hang.legsUp.useAnm]
    hanglegsup2.gif
     
  15. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    reworked box detection
    now it works like it collects all box colliders for jump in a direction
    then evaluates them starting from smallest angle for all jump styles
    jumpsboxdetect1.gif

    jumpsboxdetect2.gif

    and the raycast detection
    jumpsraysdetect1.gif

    added lerpin of parameter value in case of crossfade to same animator state
    it's better, but best a dynamic animation system would be
    jumpblendxlerp.gif

    also contactOffset
    can be set if feet are not aligned w root position
    contactoffset.jpg
     
    Last edited: Apr 1, 2023
  16. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    misc changes
    extended ground detection (array of positions ahead)
    removed angle range condition for jump (this is going to be dealt with on input)
    forced raycast and obox check on landing after jump
    targetmatching back in (using same values as lerpx) because jump height curve seems to be only smooth with this

    now it doesn't slide off obstacle like before
    and added delayd check jumppoint [jPoint.delaydGroundCheck]
    (it means if jump-off has already started, after that
    will jump no matter if it isn't grounded.
    see difference of second jump-off, >> goes to fall / jump)
    jpointdelaydcheck.gif

    jumpin with ground ahead awareness
    jumpgroundahead.gif
     
    Last edited: Apr 5, 2023
  17. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    this was crazy, no doubt the most complex data managament code in Renegade

    checks angleDifs to movetarget [jumpMX.actionData.oBox.locTarget]
    checks if last target is good
    replaces jump if not good
    replaces target if not good
    replaces jump if same

    jumpsdatabox.gif

    randomized and unrandomzed jumps
    jumpsrandom.gif
     
    Last edited: Apr 6, 2023
  18. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    Renegade.actNext implemented

    next state can be scheduled
    first use case is turnTowardsDir [Renegade.action.turnTowardsDir]
    >> TRN > FWD
    actnextturn.gif

    second action next can be scheduled too [Renegade.actNext.second]
    but this can become complicated because of state / interruption conditions
    >> STOP > START > FWD
    actnextturn2.gif
     
  19. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    new animations
    hang1anims.gif
    hang0anims.gif
     
  20. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    stepTo [Renegade.action.stepTo]
    if you have a targetP, only need to move there approximately and the last steps are automatic
    stepto.gif

     
  21. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    redone get-up mechanic
    micro-optimizations (cached last values, .lengths)
    removed jump pose check (wasn't used)

    ai path walking [scenes/ACTOR/aiWalkPath]
    which works similar to ai path driving [otherSystem/SPLINE/drive_ai]
    aipathwalk.gif
     
  22. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    smoother get-in [scenes/basic]
    (does not bob up and down when lerping to seat)
    getinnew.gif
     
  23. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    radial menu [otherSystem/DISPLAY/UICircle]
    works w mouse position and key press too
    uicircle.gif
     
  24. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    1.0 preview version has been submitted
    the price will be 60USD until 1.0 version (then 115USD)

    so THE UPDATE IS LIVE
    vers1.jpg
    other versions removed
    kept the legacy version just for fun
    vers0.jpg

    https://rawformula.itch.io/renegade-098

    notes:
    - for ragdoll getup must use bodyCOM [Renegade.bodyCOM.use]
    - weapons must have center (transform) [weaponData.center]


    - the vehicles are set up for the new physics in scenes: basic and 2GPcars

    - there seems to be bug which affects fightMX
    in Renegade.cs, uncomment bones.qcached.endT
    public void cacheFullBody(){
    if (!action.getup.isOn) bones.qcached.endT = timeNow + 1.5f;
    ...


    ....................
    the notes of the changes if someone interested
    DONE:
    stepto:
    steptox:move. moveNStep. step.
    targetx: targetT. targetP.
    jumps:
    steps before jump ::rayx fwd dwn steps . init
    dont change target if good on jumpPoint
    array of good targets
    direction : target direction . smallest angle
    standing no velo jump max dist
    obox check maxAngle
    ::replace jump if last one is same
    onjumpoff > hit + !mov (nt = jumpO >> blendin)
    before start > check grounded startT
    new: grounded time [Renegade.floorx.groundedT]
    jump styles conditions for all [jumpMX.jumpOn.x.all]
    no lowcheck if targetP lower

    aiwalker spine path
    car getin lower bodyp to seatp
    get out animation. door rotation
    xc, turnY etc last values, cache .lengths
    ragdoll getup kinetic ragd
    remove jump pose check
    input: turntowardsdirection ins.turntowardsdir
    2GP cars scene
     
    Last edited: Jun 5, 2023
  25. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    weaponMX.style
    style.gif

    could be used to add another style of weapon holding
    [weaponData.style] >> [weaponMX.style] >> [Renegade.fullBodyRX]

    some cases the left arm has weird rotations
    don't know what causes it (rig/IK/gymbal lock?)

    should primarily use animations
    but could be useful to adjust to different weapons, adding styles
     
  26. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    added ai walker obstacle avoidance
    [aiWalkMX.obsAvoid]
    aiwalk_obsavoid.gif
     
  27. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    swordMX update

    guard
    guard.gif
    sword block test
    swordblock.gif
    ai sword
    aisword.gif

    lefthand IK must use R for correct placement
    also got switching IK on/off [based on distance / if behind hip]
    ikhand1R.gif
     
    Last edited: May 17, 2023
  28. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    swordn1a.gif

    canDo.LStand and canDo.S180 like in fightMX
    and guard pose range limited to fwd if no 180

    there is sword penetration depth added
    and physreaction / killing based on depth


    meshSlicer is being supported
    meshslicer.gif

    to set up:

    knife/sword must have
    - BzKnife component (Renegade sword vectors: 0,0,-1 and 0,0,1)

    actors must have
    - Adder Sliceable Async
    - Character Slicer Sample Fast

    all actor bones w collider must have
    - Knife Sliceable Async

    swordTracerDX: assign BzKnife and set bool useMeshSlicer true

    ......................
    to use meshSlicer in 5.6
    comment out mesh.IndexFormat
    comment out Profiler.BeginSample / EndSample
    deleted BzKovSoft/ObjectSlicer/Tests
     
    Last edited: May 25, 2023
  29. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    Last edited: May 25, 2023
  30. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    so a bit of update what's happening

    - there's a new 10x10km and 5x5km terrain
    - a small code update to destruction buildings
    - some new animations


    what is planned til 1.0:
    - animator manual update
    - some controller scripts for ragblend
    - scenes demo build, more documentation and examples

    boatCX and boatKSX boatGPX for nwh
    Code (CSharp):
    1. public class boatCX : MonoBehaviour
    2. {
    3.     public NWH.DWP2.ShipController.AdvancedShipController shipControl;
    4.     public float steer;
    5.     public float throttle;
    6.  
    7.     void Update()
    8.     {
    9.         shipControl.input.Steering = steer;
    10.         shipControl.input.Throttle = throttle;
    11.     }
    12.  
    13. }
    Code (CSharp):
    1.  
    2. public class boatKSX : MonoBehaviour
    3. {
    4.     public boatCX boatCX;
    5.  
    6.     public KeyCode fwd = KeyCode.G;
    7.     public KeyCode bck = KeyCode.V;
    8.     public KeyCode R = KeyCode.H;
    9.     public KeyCode L = KeyCode.F;
    10.  
    11.     [Range(0,1)] public float throttle;
    12.     [Range(-1,1)] public float steer;
    13.     float delta;
    14.  
    15.     void Update()
    16.     {
    17.         delta = Time.deltaTime;
    18.  
    19.         if (Input.GetKey (fwd)) {
    20.             throttle += delta;
    21.         } else {
    22.             throttle -= delta*0.2f;
    23.         }
    24.  
    25.         if (Input.GetKey (bck)) {
    26.             throttle -= delta;
    27.         }
    28.  
    29.         if (Input.GetKey (R)) {
    30.             steer += delta;
    31.         } else if (Input.GetKey (L)) {
    32.             steer -= delta;
    33.         } else
    34.             steer = Mathf.Lerp (steer, 0, 0.5f);
    35.  
    36.         throttle = Mathf.Clamp (throttle, 0, 1);
    37.         steer = Mathf.Clamp (steer, -1, 1);
    38.  
    39.         boatCX.throttle = throttle;
    40.         boatCX.steer = steer;
    41.     }
    42.  
    43. }
    Code (CSharp):
    1. public class boatGPX : MonoBehaviour
    2. {
    3.     public bool isOn = true;
    4.  
    5.     public enum c {GP1, GP2};
    6.     public c control;
    7.  
    8.     public useGPC1 useGPC1;
    9.     public useGPC2 useGPC2;
    10.  
    11.     public boatCX boatCX;
    12.     //public objCX objCX;
    13.  
    14.     [System.Serializable]
    15.     public class AX {
    16.  
    17.         public float h;
    18.         public float v;
    19.  
    20.         public float h2;
    21.         public float v2;
    22.  
    23.         public float h3;
    24.         public float v3;
    25.  
    26.         [System.Serializable]
    27.         public class TO {
    28.  
    29.             public float T = 0.8f;
    30.  
    31.             [System.Serializable]
    32.             public class H2 {
    33.  
    34.                 public bool isOn;
    35.                 public float startT;
    36.             }
    37.             public H2 h2 = new H2();
    38.  
    39.             [System.Serializable]
    40.             public class V2 {
    41.  
    42.                 public bool isOn;
    43.                 public float startT;
    44.             }
    45.             public V2 v2 = new V2();
    46.  
    47.             [System.Serializable]
    48.             public class H3 {
    49.  
    50.                 public bool isOn;
    51.                 public float startT;
    52.             }
    53.             public H3 h3 = new H3();
    54.  
    55.             [System.Serializable]
    56.             public class V3 {
    57.  
    58.                 public bool isOn;
    59.                 public float startT;
    60.             }
    61.             public V3 v3 = new V3();
    62.         }
    63.         public TO timeOut = new TO();
    64.     }
    65.     public AX axes = new AX();
    66.  
    67.     [System.Serializable]
    68.     public class TC {
    69.  
    70.         public int FR1;
    71.         public int FR2;
    72.         public int FL1;
    73.         public int FL2;
    74.         public int W;
    75.         public int N;
    76.         public int S;
    77.         public int E;
    78.         public int L1;
    79.         public int L2;
    80.         public int R1;
    81.         public int R2;
    82.  
    83.         [System.Serializable]
    84.         public class TO {
    85.  
    86.             public float T = 0.8f;
    87.  
    88.             [System.Serializable]
    89.             public class fl1 {
    90.  
    91.                 public bool isOn;
    92.                 public float startT;
    93.             }
    94.             public fl1 FL1 = new fl1();
    95.  
    96.             [System.Serializable]
    97.             public class fl2 {
    98.  
    99.                 public bool isOn;
    100.                 public float startT;
    101.             }
    102.             public fl2 FL2 = new fl2();
    103.  
    104.             [System.Serializable]
    105.             public class fr1 {
    106.  
    107.                 public bool isOn;
    108.                 public float startT;
    109.             }
    110.             public fr1 FR1 = new fr1();
    111.  
    112.             [System.Serializable]
    113.             public class fr2 {
    114.  
    115.                 public bool isOn;
    116.                 public float startT;
    117.             }
    118.             public fr2 FR2 = new fr2();
    119.  
    120.             [System.Serializable]
    121.             public class w {
    122.  
    123.                 public bool isOn;
    124.                 public float startT;
    125.             }
    126.             public w W = new w();
    127.  
    128.             [System.Serializable]
    129.             public class n {
    130.  
    131.                 public bool isOn;
    132.                 public float startT;
    133.             }
    134.             public n N = new n();
    135.  
    136.             [System.Serializable]
    137.             public class s {
    138.  
    139.                 public bool isOn;
    140.                 public float startT;
    141.             }
    142.             public s S = new s();
    143.  
    144.             [System.Serializable]
    145.             public class e {
    146.  
    147.                 public bool isOn;
    148.                 public float startT;
    149.             }
    150.             public e E = new e();
    151.         }
    152.         public TO timeOut = new TO();
    153.  
    154.  
    155.         [System.Serializable]
    156.         public class DT {
    157.             //for second tap
    158.             public bool isOn = true;
    159.  
    160.             public float waitT = 0.5f;
    161.             public float offT = 1.5f;
    162.  
    163.             public bool FR1;
    164.             public bool FR2;
    165.             public bool FL1;
    166.             public bool FL2;
    167.  
    168.             [System.Serializable]
    169.             public class W4 {
    170.  
    171.                 public bool FR1;
    172.                 public bool FR2;
    173.                 public bool FL1;
    174.                 public bool FL2;
    175.             }
    176.             public W4 wait4 = new W4();
    177.  
    178.             [System.Serializable]
    179.             public class ST {
    180.  
    181.                 public float FR1;
    182.                 public float FR2;
    183.                 public float FL1;
    184.                 public float FL2;
    185.  
    186.             }
    187.             public ST startT = new ST();
    188.  
    189.         }
    190.         public DT doubletap = new DT();
    191.  
    192.     }
    193.     public TC touches = new TC();
    194.  
    195.     void Start()
    196.     {
    197.      
    198.     }
    199.  
    200.     void checkInput(){
    201.  
    202.         if (touches.timeOut.FL1.isOn && Time.time - touches.timeOut.FL1.startT > axes.timeOut.T) touches.timeOut.FL1.isOn = false;
    203.         if (touches.timeOut.FL2.isOn && Time.time - touches.timeOut.FL2.startT > axes.timeOut.T) touches.timeOut.FL2.isOn = false;
    204.         if (touches.timeOut.FR1.isOn && Time.time - touches.timeOut.FR1.startT > axes.timeOut.T) touches.timeOut.FR1.isOn = false;
    205.         if (touches.timeOut.FR2.isOn && Time.time - touches.timeOut.FR2.startT > axes.timeOut.T) touches.timeOut.FR2.isOn = false;
    206.  
    207.         if (touches.timeOut.N.isOn && Time.time - touches.timeOut.N.startT > axes.timeOut.T) touches.timeOut.N.isOn = false;
    208.         if (touches.timeOut.W.isOn && Time.time - touches.timeOut.W.startT > axes.timeOut.T) touches.timeOut.W.isOn = false;
    209.         if (touches.timeOut.S.isOn && Time.time - touches.timeOut.S.startT > axes.timeOut.T) touches.timeOut.S.isOn = false;
    210.         if (touches.timeOut.E.isOn && Time.time - touches.timeOut.E.startT > axes.timeOut.T) touches.timeOut.E.isOn = false;
    211.  
    212.         axes.h = 0;
    213.         axes.v = 0;
    214.         axes.h2 = 0;
    215.         axes.v2 = 0;
    216.         axes.h3 = 0;
    217.         axes.v3 = 0;
    218.  
    219.         touches.FR1 = 0;
    220.         touches.FR2 = 0;
    221.         touches.FL1 = 0;
    222.         touches.FL2 = 0;
    223.         touches.W = 0;
    224.         touches.E = 0;
    225.         touches.S = 0;
    226.         touches.N = 0;
    227.  
    228.         if (control == c.GP1) {
    229.             axes.h = useGPC1.axisH1;
    230.             axes.v = useGPC1.axisV1;
    231.             axes.h2 = useGPC1.axisH2;
    232.             axes.v2 = useGPC1.axisV2;
    233.             axes.h3 = useGPC1.axisH3;
    234.             axes.v3 = useGPC1.axisV3;
    235.  
    236.             if (!touches.timeOut.FR1.isOn) touches.FR1 = useGPC1.touches.FR1;
    237.             if (!touches.timeOut.FR2.isOn) touches.FR2 = useGPC1.touches.FR2;
    238.             if (!touches.timeOut.FL1.isOn) touches.FL1 = useGPC1.touches.FL1;
    239.             if (!touches.timeOut.FL2.isOn) touches.FL2 = useGPC1.touches.FL2;
    240.             if (!touches.timeOut.W.isOn) touches.W = useGPC1.touches.W;
    241.             if (!touches.timeOut.E.isOn) touches.E = useGPC1.touches.E;
    242.             if (!touches.timeOut.S.isOn) touches.S = useGPC1.touches.S;
    243.             if (!touches.timeOut.N.isOn) touches.N = useGPC1.touches.N;
    244.  
    245.             touches.R1 = useGPC1.touches.R1;
    246.             touches.R2 = useGPC1.touches.R2;
    247.             touches.L1 = useGPC1.touches.L1;
    248.             touches.L2 = useGPC1.touches.L2;
    249.         }
    250.  
    251.         if (control == c.GP2) {
    252.             axes.h = useGPC2.axisH1;
    253.             axes.v = useGPC2.axisV1;
    254.             axes.h2 = useGPC2.axisH2;
    255.             axes.v2 = useGPC2.axisV2;
    256.             axes.h3 = useGPC2.axisH3;
    257.             axes.v3 = useGPC2.axisV3;
    258.  
    259.             if (!touches.timeOut.FR1.isOn) touches.FR1 = useGPC2.touches.FR1;
    260.             if (!touches.timeOut.FR2.isOn) touches.FR2 = useGPC2.touches.FR2;
    261.             if (!touches.timeOut.FL1.isOn) touches.FL1 = useGPC2.touches.FL1;
    262.             if (!touches.timeOut.FL2.isOn) touches.FL2 = useGPC2.touches.FL2;
    263.             if (!touches.timeOut.W.isOn) touches.W = useGPC2.touches.W;
    264.             if (!touches.timeOut.E.isOn) touches.E = useGPC2.touches.E;
    265.             if (!touches.timeOut.S.isOn) touches.S = useGPC2.touches.S;
    266.             if (!touches.timeOut.N.isOn) touches.N = useGPC2.touches.N;
    267.  
    268.             touches.R1 = useGPC2.touches.R1;
    269.             touches.R2 = useGPC2.touches.R2;
    270.             touches.L1 = useGPC2.touches.L1;
    271.             touches.L2 = useGPC2.touches.L2;
    272.         }
    273.  
    274.     }
    275.      
    276.     void Update()
    277.     {
    278.         if (isOn) {
    279.  
    280.             checkInput ();
    281.  
    282.             /*
    283.             if (touches.FR2 == 1) {
    284.  
    285.                 if(boatCX.fireup) boatCX.fireup = false;
    286.                 else boatCX.fireup = true;
    287.  
    288.                 touches.timeOut.FR2.startT = Time.time;
    289.                 touches.timeOut.FR2.isOn = true;
    290.             }
    291.             */
    292.  
    293.             boatCX.throttle = axes.v2;
    294.             boatCX.steer = axes.h3;
    295.  
    296.             //if (touches.E == 1) objCX.oBox.isOn = true;
    297.  
    298.         }
    299.     }
    300.  
    301. }
    yachtCX for bearworks ocean
    bearworks.gif
    Code (CSharp):
    1. public class yachtCX : MonoBehaviour
    2. {
    3.     public NOcean.Controller Controller;
    4.     public Rigidbody rigidb;
    5.     //[Range(-1,1)]
    6.     public float YTorque;
    7.  
    8.     public KeyCode L = KeyCode.J;
    9.     public KeyCode R = KeyCode.L;
    10.  
    11.     public float speed = 2f;
    12.     public float maxYTorque = 2;
    13.     public bool useInstantZero;
    14.  
    15.     public KeyCode fwd = KeyCode.I;
    16.     public KeyCode bck = KeyCode.M;
    17.  
    18.     public float minFwd = 10;
    19.     public float maxFwd = 20;
    20.  
    21.     public float speedfwd = 2f;
    22.  
    23.     void Update()
    24.     {
    25.         YTorque = Mathf.Lerp (YTorque, 0, Time.deltaTime * 0.5f);
    26.  
    27.         if (!useInstantZero) {
    28.             if (Input.GetKey (R) && YTorque < maxYTorque) YTorque += Time.deltaTime * speed;
    29.             if (Input.GetKey (L) && YTorque > -maxYTorque) YTorque -= Time.deltaTime * speed;
    30.         }
    31.  
    32.         if (useInstantZero) {
    33.             YTorque = 0;
    34.             if (Input.GetKey (R)) YTorque += Time.deltaTime * speed;
    35.             if (Input.GetKey (L)) YTorque -= Time.deltaTime * speed;
    36.         }
    37.  
    38.         rigidb.AddRelativeTorque (0, YTorque, 0);
    39.  
    40.         if (Input.GetKey (fwd) && Controller.engineForce < maxFwd) Controller.engineForce += Time.deltaTime * speedfwd;
    41.         if (Input.GetKey (bck) && Controller.engineForce > minFwd) Controller.engineForce -= Time.deltaTime * speedfwd;
    42.     }
    43.  
    44. }
     
    Last edited: Jun 14, 2023
  31. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    improved the slash direction logic
    easier to select same direction or the other
    slashdir.gif

    support for kick
    slashdir2.gif

    notes
    bad setting that causes bug

    jumpMX: useSpeedScale without speedScale curve causes animator speed=0
    buf_speedscale.jpg
     
    Last edited: Jun 14, 2023
  32. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    these were in Renegade but these are new versions
    a bit of fine tuning in Cascadeur, foot locking
    more adaptable for physics curve this rootmotion

     
    Last edited: Jun 28, 2023
  33. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    now it's possible to do motion-matching style movement
    (with one stick input; [horizontal/vertical])
    motionmatchstyle.jpg
    I was about to do a lot exception states but done with existing functions
    (there's a bit of fine-tuning to do but works quite well)

    motionmatchstyle1.gif motionmatchstyle2.gif
     
  34. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    driveCX replaced cDriver1 and cDriver1_truck
    drivecx.gif
    can simultaneously controlled by gamepad and keyboard
    + support for additional wheels

    transport scene update
    transport.gif
     

    Attached Files:

    Last edited: Jul 9, 2023
  35. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    so this last month or so the development was slow
    but now it looks Renegade is getting ready for update

    the #583 motion-matching style movement's bugs are done

    a new stepping implementation
    which is based on two 2D states
    stepping starting w left or right foot
    steppin.gif
    being set in RenegadeGPX
    steppingpx.jpg
    and Renegade.action.steppin

    using the foot calculation of
    Renegade.data.loco.footx.side [this calculates which foot starts to step]
    the white squares in the first image

    the other variable for foot is
    Renegade.body.legs.kneeF [this calculates which leg is ahead]
    which was used for strafing stop
     
  36. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    also a gamepad-controlled menu system
    gpmenu.gif
     
  37. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591
    Last edited: Oct 19, 2023
  38. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    591