Search Unity

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. TheLetterS

    TheLetterS

    Joined:
    Jan 22, 2013
    Posts:
    31
    Naomi now has some melee weapons to train with in the adventure scene ! A throwing axe, dagger/long knife, and a samurai type sword (or like Michonne's katana in Walking Dead :) ).

    Blades_Screenshot.png

    Next I'll be working on the slingshot, bow & arrow, and the crossbow.

    Sarah
     
    MikeTon and Archania like this.
  2. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Looking very deadly. Great work.
     
  3. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    For the Bow and arrow it would be nice to make the controls fluid, similar to an assault rifle focus/zoom. Then imagine pulling a left trigger to zoom/focus then the right analog trigger on an xbox gamepad that allows you to pull back the arrow based on how hard you are squeezing the trigger. Then maybe another button for release? Just throwing out ideas. I just like the idea of the pull back of the arrow not being a fixed animation but rather 2 states that are lerped between.
     
    MIK3K likes this.
  4. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @charmandermon -

    That makes a lot of sense for a game controller. The longer you hold the right trigger the more force is applied to the arrow. I wrote it down and will keep it in mind when we are scripting that weapon. It shouldn't be too hard to do as the right trigger is just an axis whose values range from 0-1.
     
    MIK3K likes this.
  5. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Hi, with all the problems I'm having I've really been considering switching platforms, as in assets. I'm not a coder, I know some people might say I'm just lazy be I've tried and I really just don't have the ability. Perhaps I'm to right brained. I'm a designer and as you can see from the video below I'm having a few problems. I'm using the Game Camera asset and its descent and the developer is active however everyday I run into a new issue. AI being the biggest challenge I went and bought ICode which is on the robot but that's pretty much all he can do. Just run up point and shoot. The video doesnt show the major problem areas such as when I walk up to close it shoots at the floor or I can even run around him and make him keep turning circles. These types of fixes require a professional coder which I cant even write a hello world program. There are some character controller issues as well but as of now I'm pretty much willing to start over. With that in mind I just have a few key questions before I purchase this Third Person Controller asset.

    1. See my mobile controls? Will I still be able use these sprites? I saw a mobile picture on the demo page with buttons like shoot and jump at the bottom. Can I easily move these buttons and replace them with my own sprites and be done?

    2. Do you have health pickups?

    3. My game is actually closer to your adventure demo then the shooter. Will mobile controls work for that as well?

     
  6. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Thanks for taking a look at the Third Person Controller! We tried to make things as easy as possible so you don't have to look at a single line of code if you don't want to. In terms of AI, the Third Person Controller is integrated with Behavior Designer so you don't have to write any code for your AI either. On the Behavior Designer documentation page you can see an explanation of the behavior tree that we created which gives the Third Person Controller AI agents some pretty cool functionality - all without having to do any coding.

    Taking a look at your questions:

    The mobile GUI uses uGUI so it should be easy to switch out. We currently do not have a virtual joystick but since you already have that piece in I should be able to help you adjust it to work with the Third Person Controller.
    Yes, we do. In addition, from the AI example that I mentioned earlier, the AI will actually go pick up a health pack if he is running low on health.
    Yes, it will. The mobile controls don't even know what mode the camera is in.
     
  7. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165

    Hi thanks for the quick reply. I have purchased your package in hopes of migrating my game over. I'm going over much of the documentation now. I played the demo and the ai is excellent.

    But... I'm stuck already, without really messing with anything I switched to android platform and plugged in my phone. I pressed play and all the buttons work with tap and even mouse click but I cannot move the character. I cant even move with mouse or keyboard and my phone does nothing.

    Also should I send you an email with help getting the virtual joystick to work?
     
  8. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I appreciate it!
    Take a look at this post - you need to make sure you extract the source code for it to be able to detect the mobile input.
    If you could post on the opsive forums that would be great. This makes searching really easy.
     
  9. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Aww it works on a build but not with the unity remote. That sucks, cant test without building.
     
  10. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Do I have to buy Behavior Designer?? the sample project has scripts missing.
     
  11. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    Found a small bug in one of the web demos, If you hold shoot then switch weapons release the trigger the shoot animation continues to play on the next gun and if you switch back to the original gun it will continue shooting the rest of the clip it has without left clicking.

    Thanks man
    -This is dustin by the way :) (dustin@base75.com)
     
  12. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I tested it with Unity remote back before the Third Person Controller was released and didn't have any problems but Unity remote was really unresponsive so I gave up on it. I'll try it again before the next release to see what needs to be done to make it work again.
    Yes, Behavior Designer is a completely different asset. It is similar to Playmaker/ICode except it deals with behavior trees instead of state machines.

    Edit: The reason why we made this decision to use Behavior Designer is because you can use behavior trees with any type of AI. We could have added a more basic version of AI but it wouldn't be anywhere near as extensible and only work with specific situations.
     
    Last edited: May 23, 2015
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Hey Dustin :)
    Thanks for the bug report! I'll fix the web demo tomorrow and this fix will be in the next version. If you want the fix beforehand I can send you what I changed
     
  14. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    No man take your time, Im just excited about the future development. Keep up the exciting work!
     
  15. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165

    Ok, one last question and then I can start rebuilding my game using TPC and BD. Do you think it will be just perfectly fine to create my entire game under the PC platform since I cannot use unity remote to test in real time and switch to android platform at the end?
     
  16. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Yes, that will work great. Now that I think about it that's probably what I did with Unity Remote in the past. Set the target to PC and if you Force Mobile Controls on the PlayerInput component you should then be able to use the Unity Remote.
     
  17. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Nope, that doesn't work because even though the text shows up on the gui no buttons actually show up. But anyway i'm over it I'm still trying to get the behavior sample to work. It still says I'm missing scripts. Do I now need to purchase the movement add now on as well?? It says I'm missing patrol
     
  18. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    You do need the Movement Pack but it is currently free with new Behavior Designer purchases. Just send me your Behavior Designer invoice number. The Third Person Controller sample uses a lot of different assets so once you get the Movement Pack make sure you have imported the following:

    1. Third Person Controller
    2. Behavior Designer
    3. Behavior Designer - Movement Pack
    4. Behavior Designer / Third Person Controller integration assets
    5. Behavior Designer - Movement Pack / Third Person Controller integration assets
    6. Behavior Designer / Third Person Controller sample project.
     
  19. Soul_Raven

    Soul_Raven

    Joined:
    Apr 12, 2014
    Posts:
    13
    I got the latest upgrade to TPC and the legs keep shuffling when standing still. Is there a way to fix it?
     
  20. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    By any chance does the shuffling look like this? This should have been fixed with the latest version if you updated the Animator Controller. If you have modified the controller and didn't update it then the fix is listed in that thread. If that wasn't it, does it do the shuffling with a fresh project in the shooter scene?
     
    Last edited: May 24, 2015
  21. Soul_Raven

    Soul_Raven

    Joined:
    Apr 12, 2014
    Posts:
    13
    yes it does shuffle with a fresh project.
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Which version of Unity are you using? I just tried importing into a fresh project and didn't have any problems. Also, does the shuffling look anything like the video in my previous link?
     
  23. Soul_Raven

    Soul_Raven

    Joined:
    Apr 12, 2014
    Posts:
    13
    unity 5. i am starting another project and trying again.
     
  24. Soul_Raven

    Soul_Raven

    Joined:
    Apr 12, 2014
    Posts:
    13
    it work this time. i dont know why it didn't work the last
     
  25. Artificialized

    Artificialized

    Joined:
    Oct 5, 2014
    Posts:
    69
    Hello i purchased this asset a little while back and was curious on how things with the Networking were going right now this asset suits all my needs except multiplayer ): thing is i'm not some rich multi millionaire i don't have the skill set at the moment or funds to write or pay a programmer to write scripts for me. I'm trying to learn the basics on my own for now to get me by.By implementing multiplayer i believe this could easily reach the top asset to be had on the unity asset store.I would pay easily 80-100$+ for this asset and multiplayer what more amazing would it be for an indie developer or even a small group of people working together using this asset and what its capable of would just be alot of fun to have and work with on my own project.


    I saw a good buy and i took it ive been watching over the forums and post and havnt seen any news on anything about Networking or how it was going.Although it was mentioned previously a few times.Im looking forward to hearing from the developer.

    King Regards,

    Cascadex
     
  26. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    @Cascadex - I think opsive is waiting for Unity 5.1 to be released, as it will contain Unity's new networking system. The general expectation is that Unity 5.1 will be released in June, so that is not far off.
     
  27. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @Cascadex -

    @hopeful is right. I definitely want to support Unity's networking solution after 5.1 is released. I briefly looked at the networking sample projects from the 5.1 beta and it does look promising.
     
    Artificialized likes this.
  28. Artificialized

    Artificialized

    Joined:
    Oct 5, 2014
    Posts:
    69
    Great! thankyou for your quick responses i'm excited and i am looking forward to the future of this asset

    Keep up the amazing work opsive :D
     
    opsive likes this.
  29. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Hi, I know this isn't really a TPC question but does anyone know why my robots chest seems to separate from his body. In the avatar configure it says chest bone is only optional and this robot doesn't seem to have one. I'm hoping there is a work around to this I really liked this model. Although, he does retarget just fine in some of my other projects.

    Also, you'll notice that the alien will skid across the ground a little after death. This happened while playing with the default soldiers and Doug as well.

     
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @DeanMarquette -

    It looks like it is a problem with the ragdoll. Were all of the transforms correctly assigned within the ragdoll wizard?

    In terms of the skidding, I have seen that as well on my end. It will definitely be fixed in the next version.
     
  31. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    Just a small request, but could you implement a '3D crosshair' that is aware of where it is aimed and basically gets closer to the player when aimed at things that are closer to the player? The Serious Sam games are probably the best example, but Kid Icarus: Uprising and Splatoon have examples of this as well.
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @Candescence -

    Sure, that's a quick feature to add. Open CrosshairsMonitor.cs and add the following variables:

    Code (csharp):
    1.  
    2.   // The distance to start scaling the crosshairs
    3.   [SerializeField] private float m_NearCrosshairsDistance;
    4.   // The distance to end scaling the crosshairs
    5.   [SerializeField] private float m_FarCrosshairsDistance;
    6.   // The scale of the crosshairs when the crosshairs hits a near object
    7.   [SerializeField] private Vector3 m_NearCrosshairsScale = Vector3.one;
    8.   // The scale of the crosshairs when the crosshairs hits a far object
    9.   [SerializeField] private Vector3 m_FarCrosshairsScale = Vector3.one;
    10.  
    Then change the Update method from:

    Code (csharp):
    1.  
    2.   var lookDirection = m_TargetLookDirection.Invoke(false);
    3.   // Turn the GUI the target color if a target was hit.
    4.   if (Physics.Raycast(m_CameraTransform.position, lookDirection, out m_RaycastHit, Mathf.Infinity, LayerManager.Mask.IgnoreInvisibleLayersPlayer) && Utility.InLayerMask(m_RaycastHit.transform.gameObject.layer, m_CrosshairsTargetLayer.value)) {
    5.     // Set the color of all of the crosshairs images.
    6.     m_Image.color = m_LeftCrosshairsImage.color = m_TopCrosshairsImage.color = m_RightCrosshairsImage.color = m_BottomCrosshairsImage.color = m_CrosshairsTargetColor;
    7.   } else {
    8.     // Set the color of all of the crosshairs images.
    9.     m_Image.color = m_LeftCrosshairsImage.color = m_TopCrosshairsImage.color = m_RightCrosshairsImage.color = m_BottomCrosshairsImage.color = m_CrosshairsColor;
    10.   }
    11.  
    To:
    Code (csharp):
    1.  
    2.   var lookDirection = m_TargetLookDirection.Invoke(false);
    3.   // Turn the GUI the target color if a target was hit.
    4.   Color crosshairsColor;
    5.   if (Physics.Raycast(m_CameraTransform.position, lookDirection, out m_RaycastHit, Mathf.Infinity, LayerManager.Mask.IgnoreInvisibleLayersPlayer)) {
    6.     // Change to the target color if the raycast hit the target layer.
    7.     if (Utility.InLayerMask(m_RaycastHit.transform.gameObject.layer, m_CrosshairsTargetLayer.value)) {
    8.       crosshairsColor = m_CrosshairsTargetColor;
    9.     } else {
    10.       crosshairsColor = m_CrosshairsColor;
    11.     }
    12.     // Dynamically change the size of the crosshairs based on the distance of the object hit.
    13.     if (m_FarCrosshairsDistance != m_NearCrosshairsDistance) {
    14.       var scale = Vector3.Lerp(m_NearCrosshairsScale, m_FarCrosshairsScale, (m_RaycastHit.distance - m_NearCrosshairsDistance) / (m_FarCrosshairsDistance - m_NearCrosshairsDistance));
    15.       m_Image.rectTransform.localScale = scale;
    16.     }
    17.   } else {
    18.     crosshairsColor = m_CrosshairsColor;
    19.   }
    20.   // Set the color of all of the crosshairs images.
    21.   m_Image.color = m_LeftCrosshairsImage.color = m_TopCrosshairsImage.color = m_RightCrosshairsImage.color = m_BottomCrosshairsImage.color = crosshairsColor;
    22.  
    I can see others wanting this option so it will also be included in the next version.
     
    Last edited: May 28, 2015
    TonyLi likes this.
  33. TheLetterS

    TheLetterS

    Joined:
    Jan 22, 2013
    Posts:
    31
    The adventure scene is almost done being modeled/textured, here are a few screenshots!
    Terrain1.png
    Terrain2.png
    Terrain3.png
    All of the obstacles have a sign in front to highlight them and the ability they show off. There are also signs for the lab entrance and in front of the vines for climbing.

    Sarah
     
  34. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    That is looking fantastic sarah!
     
    TheLetterS likes this.
  35. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    Nice, that's gonna be fun to play with once it's done.

    @opsive Okay, that's a fairly simple method, but it works. Thanks!


    And since I've now bought the asset, and I was surprised to find that the adventure demo actually had much smoother movement controls than the combat demo did. At the least, since I'm planning on using a 'mixed' approach (adventure when not firing, combat when firing), that's one half of the equation almost perfect.

    Speaking of issues with the movement, it tends to snag on the environment when moving towards them, even tiny steps, unless moving towards them at an angle.

    Also, here's a list of suggestions, from minor to, well, less minor:

    - Allow a 'tracer' effect for hitscan weapons
    - Damage scaling for distance (for weapons which have a damage drop-off or a damage increase over distance)
    - Multiple ammunition types for a single weapon
    - 'Hybrid' weapons that can shoot and melee

    I think some Prince of Perisa-esque basic parkour mechanics would round out the adventure movement options nicely, but that'd obviously take a lot more work, haha.
     
  36. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Are you on Unity 5? I think the difference is that the adventure prototype scene doesn't have any lighting whereas the shooter scene does. If you disable the lights I bet things will improve. In the next version I'll submit a version of the shooter scene that has the lights baked for Unity 5.
    I do most of my development with Unity 4.6 since that is the minimum version that we support. Recently I have been using Unity 5 a lot more and noticed the same things. It will definitely be fixed for the next version :)

    Thanks for the suggestions! I just wrote them down and was actually planning on a few of them
    For this adventure scene we are going to be focused on the more basic movements but that is almost another demo scene idea. The nice thing about this framework is that it is relatively easy to add new abilities without having to make any changes to the core classes. When we get out of beta I will be making a lot of new videos and one of which will be adding new abilities. Parkour mechanics should fit really well with the existing ability system.
     
  37. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    Yeah, I do use Unity 5, but I don't think it's to do with performance, by 'smoothness', I mean the adventure walking/running movement feels a lot less sluggish than the combat movement, including when changing direction. There's absolutely a rather notable difference.

    Fair enough, I suppose it really wouldn't be too hard to figure out.
     
  38. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    By changing the Movement Type all you are really doing is changing how the character rotates depending on the camera rotation. As a test, try changing the Movement Type in the adventure prototype scene to combat. Is it smooth? Now try disabling the lights in the shooter scene. When you disable the lights it will be very dark so if you change the Ambient Color to a color closer to white you should be able to see again.
     
  39. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    Actually, after doing some tweaking, I think what I was griping about was more to do with the input dampening in the animation monitor, which can be lowered to be more responsive, even if the end result results in animation snapping. Along with attaching the camera to an object on the player that doesn't bob along with the body, it makes movement feel a lot more responsive in both demos. Maybe a brief override during the dampening period or something for those who want to keep root motion and the animation smooth but want movement direction changes to be faster. Just a suggestion, I suppose.

    Also, for adventure movement, it would be nice to be able to sprint while holding just to the sides, which you can't do currently. Speaking of which, the sprint just feels like it's barely any faster than just walking.

    Aside from that, though, that issue's solved. :)
     
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Ah, yeah, with root motion it's a tradeoff between smoothness when changing states and how quickly the controller can respond to changes in movement. I remember from a few weeks ago that you weren't planning on using root motion - are you planning on using it now? I want to allow you to have the option of disabling root motion, but I just want to know how quickly I should get to it. The next update will be going out in about a week and a half, and I'll try to get it in but that will depend on how well everything else goes. I will definitely be able to get it in before the next update and can send it to you ahead of time as soon as I add it.

    Can you explain more by holding just to the sides? Currently you can't actually walk unless you are using a joystick or have made changes to the Animator Controller. By default the character runs, and then if you hold the shift key the character will sprint. Sprinting is about 1.4x faster then running. In the adventure scene the default will be a walk, and then holding shift will run.
     
    Last edited: May 29, 2015
  41. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    Looks amazing!
     
  42. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    Some extra nice wall abilities would be nice to have from games like Zelda ocarina of time.

    Zelda ocarina of time/ Splinter cell wall abilities.

    stand up to a wall or jump to a wall/cliff and grab the edge and hang from the edge, if you push right or left or the character shifts those directions while hanging on the edge. Then if you push up he pulls himself up and can walk on the new area.
    I am wondering if it would be possible to code it without setting up special colliders on every edge you allow someone to jump to.
     
  43. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Those are definitely great suggestions. We haven't started to code the new abilities so I don't know how it will be implemented yet, but you will be able to hang from the pipe as you are crossing it. The wall that says "Scale" would definitely be appropriate for hanging and pulling yourself up, but we aren't planning on implementing it for this first version. The implementation for the pipe crossing may be generic enough to be able to handle hanging from the ledge, but you won't be able to pull yourself up with the pipe hang animation. We've been talking about this adventure scene for awhile now so we just want to get it out. We definitely plan on continuing to add new abilities as we release various updates.
     
    Last edited: May 30, 2015
  44. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    Well, maybe a movement speed multiplier and an animation speed multiplier (and separate multipliers for sprinting as well) might actually be best for now, since the default root motion animations actually do work well when you drop the dampening, and it should be simple to implement (hell, the Unity 5 standard assets third-person character has this), but it's probably essential for tweaking the movement speed so it's just right.

    Also, speaking of changes in movement, sometimes enough of those can play hell with the IK, as sometimes the player briefly pops into another position to the side or above if you do it enough.

    Well, what I mean is, when you try to sprint and hold left or right, the player doesn't sprint, but diagonally or just up and down works fine. Again, multipliers for the sprint would probably make it a lot easier to adjust the speed on a game-by-game basis.
     
  45. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @Candescence -

    I just added a root motion speed and animator multiplier like is in the standard assets. With the animator multiplier I added it to the AnimatorMonitor.AnimatorStateData class so you can have a different Animator speed depending on the current state that the character is in. In terms of sprint, it looks like you're right. We didn't add a left or right sprint, only forward. We'll add it in a future release.

    In terms of the player popping, what settings did you change so I can reproduce it?
     
    Last edited: May 30, 2015
  46. Candescence

    Candescence

    Joined:
    Aug 26, 2014
    Posts:
    107
    All I really did was set the dampening to 0, though I think it might happen at any number below 0.2 Really, just try and constantly change directions in a random manner, which is pretty much what causes it. I know, odd thing for a player to be doing, but testers will do weird things to try and expose bugs.
     
  47. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Hi, can I please get a script to play audio when picking up the health, ammo, and weapons for the TPC & BD example scene? I keep coming back to adding my audio on each item but the audio get destroyed with the object. I tried putting the audio on the player instead but then it just plays with every box collider in the scene. Please help? Is this something BD can be used for as well?
     
  48. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @DeanMarquette -

    The trick is that you need to keep the pickup object active long enough for the AudioSource to play. In order to do this you need to temporary disable the renderer until the GameObject has been deactivated. I just did this and would normally post the changes here but there have been a few other changes related to the next update. This next update will be going out next week so it isn't too much longer.
     
  49. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    Or you can have the audio component on the player, when the player touches the object it grabs an attached sound effect audioclip off of the object then plays it on the player, then does what ever it needs with inventory and then the player deletes the object.
     
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    The problem with that approach is that you would need to have multiple AudioSources if you want to be able to pickup multiple objects within a relatively short period of time and have all of the sound effects still play. It is a rare case but there's no reason to limit it.

    With the new solution I created a new parent class of ItemPickup and HealthPickup called PickupObject. When the item or health object has been picked up by the player the PickupObject will play the sound effect. At this time the class then disables the renderer and registers itself with the Scheduler so it will completely disable the GameObject after the sound effect is done playing. This allows the sound effect to finish playing and you don't need multiple AudioSources
     
Thread Status:
Not open for further replies.