Search Unity

Controller Third Person Templates by Invector

Discussion in 'Tools In Progress' started by Invector, Aug 20, 2015.

  1. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    I am attempting to make a "behind the back" stab motion. I decided the easiest thing to do was to place a collider behind the enemy to enable triggering the animation. My question is, How can I rotate my player towards the enemies backside to make sure he's always stabbing in the back?
    I know I can determine the angle from the Dot product but once I have the required angle, what do i need to do?

    Thanks
     
    jbb1979 and WsdServers like this.
  2. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Hello,

    Is there a way for me to check the amount of damage for the weapon the player is currently holding? Can I get the Item ID and then from there get the damage for that Item?

    Thanks,
    rich
     
    jbb1979 likes this.
  3. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    This may be an old problem, but, I imported the latest version of Shooter into a new empty Unity 2018 3.6 project, and the import created blank warnings (4) in the console and the project would not play. To get rid of them I changed the project settings Scripting Runtime Version to .NET 3.5.The blank errors are gone, but in this new very clean project with no console errors, the shooter/melee no inventory demo has issues, I can only pick up one weapon, and when I pick up the sword the controller holds it like a rifle?

    So Question: Is Invector Shooter dependent on any specific version of .NET?

    Edit: If anyone is interested, the version of .NET that can be used in a Unity project is dependent upon the level of C# code used in the scripts. When a developer uses the C# commands from, say, the "new and improved" C# 6.0, in their scripts, if the project is not set to the appropriate .NET version, the scripts will cause errors.
     
    Last edited: Oct 9, 2020
    jbb1979 likes this.
  4. Empereur7

    Empereur7

    Joined:
    Apr 7, 2018
    Posts:
    65
    how can I do to add a new Android key for a new animation (a combat animations) I watch tutorials on the internet but I find that for shooting, help me how to do for combat animations? please
     
    jbb1979 likes this.
  5. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You can use the Stealth kill free add-on:
    https://assetstore.unity.com/packages/templates/systems/invector-stealth-kill-add-on-135495

    You can get it from the meleeManager.currentWeapon

    I just test here on 2019.1.10f using .net 4.x and it's working just fine using the latest version from the asset store.
    Can you re-import the template to a new and clean project just to make sure?

    We already have 2 combat attack options, weak and strong, if you want to add another one just follow the examples of those 2, basically you need a new input in the vMeleeCombatInput that triggers a trigger in the animator to play a animation.
     
    jbb1979 likes this.
  6. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    jbb1979 likes this.
  7. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I created another clean project. The same problems occur.

    I am using Unity 2018.3.6 64 bit and Shooter 1.3.1 and Windows 7 64bit sp1, (that Unity claims is supported). See System requirements on the Unity download page. When I create the fresh Unity Project and before any imports I get 4 blank console warnings. Like this:
    Blank Errors.PNG
    This is a unity bug they deny and refuse to fix. see https://forum.unity.com/threads/four-blank-errors-in-each-new-project.599980/
    The clean new project comes with the scripting runtime set to .NET 4.x In Settings
    Runtime.PNG
    The empty project will not play, unless the runtime is changed to .NET 3.5. Like this:
    Run 3-5.PNG
    The 4 red errors go away and the empty project plays.

    Now Import Shooter 1.3.1
    The Shooter import changes the .NET back to 4.x:
    Scripting Runtime Invector.PNG
    The 4 errors are back and no demo will play
    I can get the shooter Melee No Inventory demo to play IF i change the .NET back to 3.5 BUT I get issues like this.

    Sword.PNG

    Bottom Line here is that Unity is not compatible with Win 7 .NET 4.x, (its default).
    Importing Shootrer 1.3.1 forces the .NET back to 4.x. Resetting the runtime to .NET 3.5 permits the No Inventory Demo to play but the demo seems buggy. Is the demo normally buggy?

    EDIT: The issue is that newer C# language cannot be run in a Unity project set for .NET 3.5. For Win 7 there is a single upgrade from microsoft that resolves this by stoppoing the empty errors, permitting the Unity setting to be raised to .NET 4.x.
     
    Last edited: Oct 9, 2020
    jbb1979 likes this.
  8. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    One thing I've already learned, not just from Invector but from ootii also, 2019.x is not compatible with just about everything.
     
    jbb1979 and wood333 like this.
  9. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    Has anyone ever seen the screen flicker when playing the scene and the Camera has Post Processing Effects? When I deselect PP and run, there's no initial flicker.
    Any ideas?
     
    jbb1979 likes this.
  10. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Ops this sword prefab is using the wrong MoveSetID, just change from 1 to 2
     
    jbb1979 likes this.
  11. Empereur7

    Empereur7

    Joined:
    Apr 7, 2018
    Posts:
    65
    ok thank you, a concern when I press the touch of Jump, my character jumps very well but when I press the key mobile attack my character does not throw a blow, how can I please, ( it's a Shooter character)
     
    jbb1979 likes this.
  12. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I know that. But wait.... there's more

    In Shooter- no inventory, when the Controller character is holding a weapon, it refuses to pick up a different weapon. In earlier demo versions, the controller character would drop the first weapon and accept the second. I compared the broken demo in the fresh 2018 project to a working demo in a unity 2017 project. The 2017 demo works fine, but the No Inventory demo from the latest Shooter version is not working in Unity 2018.3.6.

    Could you take a closer look? The no inventory demo works in the 2017.3 project, but not in a clean 2018.3.6 with the latest Shooter version in a project using .NET 3.5.
     
    Last edited: Jul 30, 2019
    jbb1979 likes this.
  13. Brothers-Studio

    Brothers-Studio

    Joined:
    Jul 4, 2018
    Posts:
    4


    i am try to use FSM Template AI (Beta) with the invector version 1.3.1 , but i get many errors.
    then i try to use paragon ENEMYS but still try to fail.
    what line of code i need to use invector player and paragon enemy to get damage in player and enemy??
    as like invector player shoot paragon enemy then paragon enemy get damage.
    and when paragon enemy shoot invector then invector player get damage.
    i use upper line of code but still error.
     
    jbb1979 likes this.
  14. Brothers-Studio

    Brothers-Studio

    Joined:
    Jul 4, 2018
    Posts:
    4


    i am using FSM AI Template beta with invector version 1.3.1 but get many error.
    and then i try to use paragon enemy with invector version 1.3.1 then i am fail to get damage in both side.
    what line of code/ call functions to get damande in both side??
    as like invector player shoot paragon enemy then enemy get damage.
    and when paragon enemy shoot , invector player then player get damage.
    how i do it??

    upper line of code i try but still get error.
     
    jbb1979 likes this.
  15. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You need the FSM AI v1.0 in order to work with the Shooter v1.3.1 ;)
     
    jbb1979 likes this.
  16. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Quick Preview of the next update new feature Weapon IK Adjust

    Basically, we wanna create a system that allows you to fine tuning the idle and aiming poses for your custom characters since not every rig fit's our default animations.

    We end up creating a very cool system that not only does the fine tuning but you can create entirely new poses from the same animation source, it works for Standing, Standing Crouch, Aiming and Aiming Crouch and all the modifications you do are saved in real time for each weapon/pose!

     
  17. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    320
    Good stuff, Looks good - -
     
    JBR-games likes this.
  18. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    Ok, I'm desperate. I have not found a good TPS framework to deal with stairs but I am hopeful. My character is bouncing like mad going up stairs. I have a video showing what I mean, with the settings included. I am currently using the latest Shooter 1.3.2 and the latest Basic 2.4.2



    Thanks for any help.
     
  19. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Try using our default values for the StepSmooth

    StepOffsetEnd: 0.45f
    StepOffsetStart: 0.25f
    StepOffsetSmooth: 2f

    Your character has a pretty slim capsule collider, you could increase just a little bit the radius, that would help too.
     
  20. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    Awesome. That was it. Thanks
     
    Invector likes this.
  21. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi All - Not a big deal because I can go the [ Componet => Script => Invector ] route but for some reason when using the quick Invector => Basic Locomotion => Create basic controller I get a quick flash and the window doesn't come up anymore.
    No bricks in the console. Any Ideas ?
     
  22. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    That's odd, are you using a Beta or Alpha version of Unity by any chance? we don't support those due to constant changes and instability.
     
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Official Add-on Builder by Invector

    (vStore)
    (AssetStore)






    * THIS ADD-ON REQUIRED INVECTOR'S SHOOTER TEMPLATE v1.3.2 *

    Builder Official Add-on Plug & Play and Expandable.
    Collect Items and Build them anywhere in your scene to create traps or interactables!
    This add-on includes:
    - Build Destructible Wooden Board to barricade window
    - Build Wood Spike Traps to fierce enemies into ragdolls
    - Build Explosive Mines
    - Build Automatic Turrets (Machine Gun and FlameThrower) featuring custom range, angle, usage time, ability to reload with ammo.
    - You can expand and create your own builders with custom animations


    All features are designed with custom animations, sound effects, and particles already included in the package.​


    TRY THE DEMO:
    [Download]









     
    Last edited: Sep 2, 2019
    nirvanajie and sjm-tech like this.
  24. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Where are the respawn controls? I have the latest shooter version in unity 2018.3. When my character goes rag doll and dies, play stops and the camera relocates to the side of and below the terrain. I have not been able to find what I need in the docs or forum. I thought the respawn was automatic to the original location of the controller, similar to the demo scenes, but I don;t get that in my scene, and I can't find where I set that up.
     
    Last edited: Aug 27, 2019
  25. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    The respawn works via the GameController, you have the following options:

    - You can assign a SpawnPoint (empty transform) so that the Player can respawn on that specific location
    - Assign a Player Prefab to instantiate one in the scene, this means you don't need a player in the scene before hit Play
    - Or leave both unassigned and the Scene will Reload (that's what happens in the demo scenes)
     
  26. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Does not reload. However I get an error message:

    Can't remove vThirdPersonController (script) because InvectorHAPLinkShooter (script) depends on it.

    So. Is this an issue with the HAP integration?
     
    Last edited: Aug 29, 2019
  27. rcthompsonuk

    rcthompsonuk

    Joined:
    Aug 2, 2019
    Posts:
    3
    Three years later and still the same error, but unfortunately removing the jaw bone doesnt make any difference, I've tried it in several versions of Unity etc..

    this template has many bells and whistles attached which makes it appealing compared to similar offerings for Unity such as Opsive, but its small details like this along with how much of a pain it is to align the weapons properly that make this template unusable for any practical purpose to the people I imagine its aimed at i.e. people with little to no coding knowledge who just want to prototype something with their own models
     
  28. Daahrien

    Daahrien

    Joined:
    Dec 5, 2016
    Posts:
    100
    Hello, I'm thinking on using Invector, but I must ask, how do I controll the character via script? (I plan to make my own AI solution, so I need to control a player via scripts, like move here move there, (play the move animations) switch to that weapon, shoot the weapon, etc, also I plan to add multiplayer and when the enemy sends the networking message about it too (changed weapon, shot weapon, jumped, etc), how do I tell the 2nd character to jump, to shoot and to change qweapon, etc etc

    Also it seems if there are 2 players, ones gets destroyed, so how do I create the 2nd player controlled via networked messages. I hope I made myself clear.

    Edit.- Just to make it more clear. I just want to know how to control a character via scripts, to be able to tell it to aim weapon, shoot weapon, change weapon, jump, move to x position (start walking animation, finish walking animation) so I can make my own AI solution, also to be able to control the networked players in a multiplayer match. For example player 1 receives message from player 2, "player 2 jumped", how do I do so the player 2 the player 1 sees, jumps?
     
    Last edited: Aug 29, 2019
  29. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Yep, I think you're trying to destroy the Player but HAP integration needs access... you probably need to make a verification to remove/add the player when he dies/spawn

    The jaw issue is not actually a Template issue, it happens with any character that you do the retargeting to our animations, the V-bot doesn't have a Jaw bone, so any 3D model that you apply our animation set will have the mouth open, and the solution is to remove the jaw bone of your character OR replace our animator controller to your own animations (which is the whole idea behind the template, provide a solid base for your game but you need to customize the rest, animations, sounds, textures, etc...)

    Did you try our latest update? we included a new IK adjustment system which not only makes it easier to align weapons, you can also create entirely new poses! I think many users would disagree with your "this template unusable" comment, there are a LOT of cool projects being created some of which have very little to no scripting knowledge at all, just check our W.I.P forum > http://invector.proboards.com/board/3/

    So... let's see if I understood you... you want to convert the ThirdPersonController to an AI Controller? o_O
    Why not use the FSM AI Controller instead?

    The ThirdPersonInput script is responsible to call all the controller methods like jump, move, crouch based on Inputs.
    To have more than 1 controller in the scene, you need to uncheck the option "Use Instance" in the Controller inspector.
     
  30. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I'm using the Shooter asset as provided, (no code of mine, just your GameController) . Isn't this going to be a problem for everyone using the HAP integration? It is my understanding that the HAP integration is by Invector, therefore, isn't it appropriate for you to solve this issue in your integration? Or am i being presumptuous?
     
  31. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    The HAP integration is not provided directly by Invector but by Malbers ;)
     
    Invector likes this.
  32. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Then why does it say it was "created" by Invector on Invector's forum under integrations?

    Invector Integration.JPG
    If I'm mistaken, I will happily bring it to Malbers" attention.
     
  33. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    The post is by Invector but reports a Malbers video about his integration.
    The content of the post is "Malbers official video tutorial"
     
    wood333 likes this.
  34. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thank you for pointing that out. I have posted to Malbers.
     
    sjm-tech likes this.
  35. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Builder Add-on is now available on the [Asset Store]
     
    sjm-tech likes this.
  36. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    FYI - The solution was to comment off one line of the HAP Link script: HAP LINK respawn issue malbers.JPG
     
    Invector and sjm-tech like this.
  37. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi- Had swimmer add on for while and just now messing with it. :) had same result in scene with Melee controller and the demo . He wont drop under water and swim - Effects yes but no movement and skids across water. box c is set good. Probably something stupid. :)
     

    Attached Files:

  38. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Go to Invector > Import ProjectSettings
    You're missing our tags, layers and input manager.
     
  39. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Updated to Shooter 132. Everything is working except fire and reload. I can pick up the gun and aim, but not fire or reload? Can you help? Everything worked before the upgrade. Note: If I drop your Vbot prefab into my scene, the Vbot can fire and reload, so my project is working, just not my controller.

    EDIT: Looks like an animator issue. Our old animator would not fire or reload, so we need the newer animator with HAP integrations, which we will further update for our project needs.
     
    Last edited: Sep 17, 2019
  40. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    Hi all, how can I do when my vCompanionAI dies that the scene starts again? Thank you for your answers
     
  41. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You can use the OnDead Event of your AI to trigger the method ResetScene from the GameController
     
    wood333 likes this.
  42. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    thank you very much it works but a problem when the scene restart the vThirdPersonBasic does not begin at its initial point when I launched the game for the first time, how to solve the problem?
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Assign a SpawnPoint to the GameController
     
  44. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
  45. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I'm having trouble getting the shooter template to function as well as the melee and basic controller.

    First and formost is the crouch action (using 360 controller). Everytime I crouch the character crouches, then stands, then crouches, then stands, then crouches etc.

    He stays in the crouch position basically and wont come out of it with another press of the Y button.

    Second, the camera keeps clashing with the character, going through obstacles etc.
    See this 27 second video demo

    https://1drv.ms/u/s!AqCnWIL3cdjfgvMXiieDqIdcn-gJ6w?e=8Vq7Lk

    Thanks for any input.
     
  46. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I figured it out.

    The issue when I first started was that I had to have the character on the default layer as on the player layer it fell through the terrain. But noticed the demos used the player layer for the character.

    The solution was to set the character and children to Player layer, and then just change the main character game object to default layer. The character then doesnt fall through the terrain and the camera and crouch issue is solved.
    Not sure why the demo scene character can use the Payer Layer for the main game object?
     
  47. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    The integration packages are no good as they are in a tar file and when I extract them I get loads of files and no package to import into unity.

    Any chance you can post a direct link somehwere?
     
  48. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Actually, I just tried again and it downloaded as a unity package. thanks
     
    Malbers likes this.
  49. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    This looks like a old issue we used to have with the tpCamera Culling system...
    What version are you running? We recommend always the latest versions to get the latest fixes and new features
     
    Hawk0077 likes this.
  50. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am using the latest version, not sure what number at present. I did fix it though. Heres how:

    The issue was related to the player Layer. In the demo scenes provided and when I added a controller to my scene, the Player Layer was set to PLAYER. But with that setting my character fell through the terrain.

    So, I changed the Layer to Default which caused the issues above.

    After posting I searched the demo scenes and they were all set to Player Layer which I couldn't understand. So I set my character to Player (children too) then changed only the top level game object to default which stopped the player falling through the terrain and the glitchy camera as described above. Since then everythings worked fine.

    Version says 1.3.2 for shooter template in PDF