Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Third Person Controller - Third Person, AI, Multiplayer, Mobile Framework

Discussion in 'Assets and Asset Store' started by opsive, Jan 21, 2015.

Thread Status:
Not open for further replies.
  1. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Hmm.. are you able to reproduce the issue in the shooter/clean scene? I want to be able to see what's going on to have a better understanding of it. If you have FinalIK you can also use that instead of the CharacterIK component which would be a more robust IK solution.
     
  2. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    The beta is largely complete and we are looking good for a late July/August release. We've been tweeting small updates here but have recently been pretty silent as we work on the demo scene. Now that it's mostly complete we are working on the timing of everything and then we'll have an announcement when the beta will be out. Things should move pretty quickly after that. As soon as the beta is released I will be creating a new thread that is dedicated to the joined TPC-UFPS asset.

    We're getting close!

    DduUOAyU8AEpuMk.jpg large.jpg
     
  3. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    Yeah I just threw them into the shooter scene and the same thing happens.
    I don't have 2 handed weapon on but the animations are the correct positions. I just dont get why turning the hand weight off would make it point up.
    Maybe I will check out the FinalIK.
     
  4. Niltsor

    Niltsor

    Joined:
    Jul 3, 2017
    Posts:
    4
    Purchased :) Will play with it this week-end! Hope everything will go well as I plan to use it for my final work in my level design course at school.
     
  5. Muggleking

    Muggleking

    Joined:
    Sep 9, 2017
    Posts:
    1
    Is this going to be a completely new purchase or will UFPS / TPC provide an upgrade path?
     
  6. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
  7. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    I have a question about the fire direction. I notice that when you are close to a wall, the vector changes to that the intersection of the vector hits the center point of the camera, which is the desired behavior. I assume this is done by taking a raycast from the camera forward direction and if it hits something, set the fire direction to intersect the raycast hit point position. I can't seem to find it in the code though, do you remember where this is done? I see the target look direction invoke but cant seem to find the logic behind the vector change when intersection a wall.
    Thanks,
     
  8. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Within ShootableWeapon.FireDirection it calls the Target Look Direction Look Point SharedMethod which calls the CameraMonitor.TargetLookDirection method. This is where it determines the direction to shoot.
     
  9. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    In the "Third Person Shooter" scene, I see the player can hit the ground and create a massive attack and can throw fire using his hands. How I can create more actions like that? I want to create a RPG game, and want to use more more magic in my game.
     
    Last edited: Jun 6, 2018
  10. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    Thanks,
    I'm having an issue when I switch weapons it un assigns the object from the hand of the player, but only for the Assault Rifle. Other weapons stay in the hand and are just disabled, but the assault rifle is no longer a child of the hand but instead it is child of the scene. When switching back to the assault rifle, it puts it back into the hand, but scales the weapon each time so it stretches it out when you switch multiple times and gets super big in the scene.

    I checked that it is in the hand when spawning and also it is not in the default loadout of the player inventory. Any ideas why this might be happening?
     
  11. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    That's the magic item type - you can create it similar to the other items with the Item Builder. Instead of a shootable weapon in the video you'd choose magic.
     
  12. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    The only time the item changes transform parents is when it is holstered - I'd double check on the ShootableWeapon to ensure you don't have anything filled in for the holster field.
     
  13. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    yeah that fixed it, taking out the assigned holster location. The weapon functions fine but bothers me that it takes it out of the parent hand when disabled. i guess its not a problem to the gameplay just find it strange
    Thanks yet again
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Hello! I tried to set up a top down character but It behaved weird, and the mouse didnt work at all. I set up Scene and input. Then made the character and choosed top down.. And then in the main camera I dragged the player to the required component... when I hit play, its not top down, and cant move the mouse.

    I tried with the adventurer too and then I could move the mouse but not at the same time as I was moving?

    Using latest Unity 2018
     
  15. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Does the demo scene in a new project work for you? If that doesn't work either then it sounds like it's something input related. If you have any joysticks/unique keyboard/mouse configurations make sure you unplug it or define the inputs within the Unity Input Manager. You can also use Rewired which handles these type of situations really well.
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    I havent actually tried. Im on a laptop. Yea I have rewired so I could test. But the characters neck rotates weird too..
     
  17. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    I got it to work... But the topdown I dont understand??
     
  18. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    mattis89 likes this.
  19. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    772
    @opsive Do you have PDF versions of your documentation?
     
  20. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Yes - there is a pdf located in the Assets/Third Person Controller folder.
     
    transat likes this.
  21. Totals

    Totals

    Joined:
    Nov 27, 2013
    Posts:
    22
    any plans to add integration with usurvival?
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    We are currently not adding any new integrations to version 1. I can add it to my list for version 2 but there will be some higher priority integrations to get done first. I've also found that these complete assets in particular are harder to integrate with because they expect to use their own character controller. When I do an integration I try to reduce the amount of work necessary in order to setup the integration so it's easier to maintain.
     
  23. janiche

    janiche

    Joined:
    Jan 4, 2015
    Posts:
    52
    I'm trying to make my character attack to my camera forward (using cinemachine freelook cam), but I don't know how. there is ani option to turn to facing camera?
     
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Hello! This topdown ”template”, I cant get the camera look/ aim to work properly, it aims weirdly, any setting I have to remember?
     
  25. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Are you using the adventure movement type? On the RigidbodyCharacterController you can enable Combat while the character is aiming which should help this situation.
     
  26. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    You're referring to this package, correct? On the CameraHandler if you remove the Zoom state name then it will no longer zoom in when you aim.
     
  27. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Im reffering to the whole TPC , I use the same settings like in that packaged you linked.
     
  28. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    For top down I would start with that sample scene - it contains the default camera state setup for a top down view whereas the clean scene contains a wide variety of setups.
     
  29. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Hello! About the split screen, did I do it the way that I built 2 characters like usual? Add one more maincamera? and how do I use the rewired component? I do t remember anything and cant find my old project....
     
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    Yes, you can build the character like normal. Make sure you specify the character each camera will control, and also each UI element should also have the character specified. Rewired can be used by adding the RewiredInput instead of UnityInput component.
     
  31. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Thanks alot! I cant see the inputs/actions from tpc ? i have added the script on player .
     
    Last edited: Jun 25, 2018
  32. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Hello! So I got it all working with the controllers... But dealing damage to an AI and AI deals damage to player...? I guess I need the source code..
     
  33. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    If we wanted to setup our inventory so consumable items such as medkits and grenades need to be equip to be used, would you recommend just using it as say a melee weapon and adding anims and code to handle desired outcome? or do you think it would be best to go another route?
     
  34. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    I ended up creating a new item type class and added it to the itembuilder so that I have control on the behaviors I need for using items that must be equipped. this seemed to be the cleanest solution instead of hacking the melee class
     
    Last edited: Jul 3, 2018
    mattis89 likes this.
  35. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Im using Emerald AI so I need this two assets to communicate...
     
  36. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    That's a good solution. I was going to recommend either using the Static Item object type or deriving a new class from Static Item similar to how the shield is done.
     
  37. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Okay, thanks.. Well the problem is that Im using it with emerald... SO I guess I have to somehow get it to understand tpc events...No intergration?
     
  38. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    That's correct - the Third Person Controller is not integrated with Emerald AI.
     
  39. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Oh My God!!!!!!! I mean like, wow! The 2.5D and topdown belongs to TPC right?
    Are you keeping UFPS & TPC seperated like before? And the development of the fps concept are put more time on than the tps right? I just tought that why have a tps in ufps when you have tpc?
    Anyways Im really hyped about the topdown & 2.5D :D This is awesome! And late July/August is perfect for me. I havent yet done much else than designing.. I work with 3 titles at once..

    Anyway, is there any sample project besides the one with the turrent than contains some meele ai and damage events?
     
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    This post should answer all of your questions: :)

    https://forum.unity.com/threads/bet...ller-ufps-2-third-person-controller-2.533637/
     
  41. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
  42. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    I am trying to setup an inventory system that allows multiple guns of the same type. I have done this successfully except for the last remaining part being the current ammo in the clip is still shared between different guns.

    Do you have any recommendation on how to assign the loaded ammo between guns? I can't seem to find a place to change this value, and i assume if i "use" the ammo with m_Inventory.UseItem it will not have the desired results.

    Where is the current clip behind stored for the guns? I saw there is a m_PrimaryLoadedCount in the itemMonitor but no setter and I dont see where this value is stored and accessed when switching guns. Any input?

    Thanks,
     
  43. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    I recently added a pistol to my character that have quite long arms and are quite skinny cartoonish.. when he hold the guns with both hands , the right hand is overlapping the left one and they are like stuck together, is there a way to move the arms&elbows so they come further apart? I saw the IK component but I dont found anything on arms.
     
  44. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Is there anywhere to specify what sound should play when it hits what? enemy, terrain, wood etc..
     
  45. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    I have 2 characters (co-op local multiplayer) P1 with a camera and P2 with a camera.. both are in the same screen so its not splitted.. its a topdown shooter where p2 have to follow p1 .. but when p1 dies... I want p2 to be the main "camera".... Tips on how to achieve this?
     
  46. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    m_PrimaryLoadedCount is a SharedProperty so it maps to the SharedProperty_PrimaryLoadedCount within the inventory. So when the item monitor loads it does a:

    Code (csharp):
    1.  
    2. GetCurrentItemCount(typeof(PrimaryItemType), true);
    3.  
    Does that give you enough to progress? Or is there anything else?
     
  47. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    On the ShootableWeapon you can set a non-dominant hand for the IK target under the General Options. This allows you to specify a transform where the non-dominant hand should be located. This transform should be a child of the weapon so it's always in the correct position.

    It doesn't - the surface system from UFPS has been added to version 2.

    You can set the Character property on the CameraMonitor: http://opsive.com/assets/ThirdPerso...ird_person_controller_1_1_camera_monitor.html
     
    mattis89 likes this.
  48. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,107
    Excellent thank you!! Last question this week , where do I find the reference to the players health? Emerald is now intergrated, but the AI keeps hitting the players even when he’s dead, I need to put something like if player health equals to zero, in the emerald script..
     
  49. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    242
    my problem is with the setting of the value. my thought is to just assign a new value when switching to a different gun of the same type, there are no setters obviously, do you think there would be any problems just reassigning the value of loaded when switching to different weapons of the same type?

    edit--------
    basically what I would like to do on weapon switch is
    Code (CSharp):
    1. GameObject.Find("Active Weapon").GetComponent<ItemMonitor>().m_PrimaryLoadedCount.Set(inventoryItemList[itmIndex].currentAmmo);
    ---------------
     
    Last edited: Jul 10, 2018
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,846
    You can get a reference to the health component and then use the CurrentHealth property: http://opsive.com/assets/ThirdPerso...e_1_1_third_person_controller_1_1_health.html
     
Thread Status:
Not open for further replies.
unityunity