Search Unity

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    RFPS is deprecated, which means it's no longer sold or supported by the developer. The Asset Store has many other first/third person controller assets, though.
     
  2. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Honestly I use UFPS for another project but I actually like RFPS better for certain things I also find it easier to modify which is why I wish it could go open source. Unfortunately the maker has deleted everything about them so contacting them is impossible. Although its deprecated this forum is keeping it alive.
     
  3. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @TonyLi Tony do you know how to get in contact with the old developers? If this went open source or say.... Pixel Crushers supported...that would be awesome. I am with @Bioman75 . This is a very good tool to use and I like it more than what is currently on the market.
     
  4. undyne419

    undyne419

    Joined:
    Jan 27, 2021
    Posts:
    2
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    @SickaGamer - No, sorry, they're offline as far as I know.
     
  6. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    Does anyone know how to modify the fps controller itself to make it more grounded, bit less floaty when going off ramps and slopes, better air control and just overall a bit better when it comes to moving around to moving at a faster pace than the normal speeds? I already have a constant force script on my character to make him fall faster and stick to the ground better.

    (if it helps I have walk speed set at 12.5 which is decently fast but not to fast (Im making a doom like) but this speed tends to launch the player on slopes or ramps.)

    By air control when jumping atm you fly into one direction with momentum and cant really control where you go or land. I want Players to be able to have more control in the air to make drifting adjustments if they wanted. This would make platforming much easier instead of hoping you land on a platform after a jump.

    I dont know if rigidbody settings such as Mass, Drag, Angular Drag and so on have any effect.

    I would love to know what setting/numbers you have in your inspector to achieve the perfect stats for your character and game. Thanks to anyone that could offer up some advice!

    Also how do I change the Fov on the main cam. It seems to be locked at a certain number even when I change it and press play it reverts back to default.
     
    Last edited: Jan 28, 2021
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    @TheChairMaster64 - RFPS controls the FOV in code. You can set some of the settings on the player's Ironsights component. Gravity is controlled on line 1501 of FPSRigidBodyWalker.
     
  8. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    @TonyLi thanks for your help this has been something I needed since day one and this has open up a lot of new possibilities for my game. One last thing though. So when it comes to Trigger, Destroy, Disappear, Collison Event and so on. Is it possible for them to change the value of the selected item like wind strength or direction?

    Are you able to give me a short run down of what these options are? I comepletly understand ones like bool enabled/disabled or game object active/deactived

    but ones like string, broadcast, CancelInovke, Send Message, Stop/StopAll coroutine I don't understand at all and I feel like if I knew how these work it could open up more options for me. Is it documented in the save system pack?

    Its all good if your unable to help me here just curious on those other options. But once again thank you very much on the other stuff!
     

    Attached Files:

  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    That's all of C# programming -- a big topic, not something that can be answered in a single forum post. There are some great tutorials on C# scripting in Unity. I recommend going through a few of them to get a better idea of what you can do with the RFPS scripts.

    The Save System for RFPS just saves and loads, and does scene transitions. It doesn't provide any features to adjust wind strength or anything like that.
     
  10. rainbowmirza

    rainbowmirza

    Joined:
    Jul 25, 2020
    Posts:
    21
    Hi, I'm Currently making a game where in each level I change Player's Location,
    In my manager i just change my player's position according to Level ID, say
    player.transform.position = playerSpawnPoints[levelID].transform.position;
    player.transform.rotation= playerSpawnPoints[levelID].transform.rotation;
    the problem is that, it only changes the player's position but rotation remain's same. Due to my game need I have to limit player's rotation along x and y axis, i've done that in fps camera by limiting maximum and minimum x and y. Nut when I change FPSMain position and rotation in Start() it only changes the position. Any idea I can change Player's rotation too?
    And also, this is my First Post in Unity's Forum, So welcome me please. :)
     
  11. undyne419

    undyne419

    Joined:
    Jan 27, 2021
    Posts:
    2
    can someone help me fix this problem? ArgumentException: Input Button Left is not setup.
    To change the input settings use: Edit -> Project Settings -> Input
    InputControl.Update () (at Assets/RFPSP/Scripts/Player/InputControl.cs:167)
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    The instructions are right in that message. Select menu item Edit -> Project Settings. In the Input section, expand All Axes. Add a new input named "Left" and assign some inputs such as "A" for the A key of WASD. If you play and it gets past that error, you may also need to add other inputs such as "Right" if more messages indicate.
     
  13. ProBrStalker

    ProBrStalker

    Joined:
    Aug 20, 2017
    Posts:
    65
    Hello guys, I need your help for a little script ...
    well the script allows the player to get in and out of a helicopter (as well as pilotalo too) ...
    but when I try to get into the vehicle I get this error:
    upload_2021-2-2_16-38-2.png upload_2021-2-2_16-38-46.png
    And it just so happens that I can't fly and control the helicopter ... do you have any idea what I'm doing wrong?
    This is the Script:

    *I'm trying to integrate with this asset:
    https://assetstore.unity.com/packages/tools/physics/base-helicopter-controller-40107
    *And Sorry For my English =/


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEditor;
    5.  
    6. public class HelicopterInteractRFPS : MonoBehaviour
    7. {
    8.  
    9.     UnityEventQueueSystem m_EventSystem;
    10.     FollowTargetCamera m_FollowTargetCamera;
    11.     HelicopterController m_HelicopterController;
    12.     Transform m_Target;
    13.  
    14.     public GameObject FollowCamera = null;
    15.     public GameObject exitPosition = null;
    16.     bool inVehicle = false;
    17.  
    18.     #region Variables - RFPS
    19.     private FPSPlayer FPSPlayerComponent;
    20.     GameObject m_Body = null;
    21.     GameObject m_BodyClone = null;
    22.     bool m_BodyVisible = false;
    23.     GameObject m_MainCamera = null;
    24.     GameObject m_WeaponCamera = null;
    25.     GameObject m_WeaponObj = null;
    26.     #endregion
    27.  
    28.     void Awake()
    29.     {
    30.         //Camera Checks and initial setup due to RFPS
    31.         Camera tmpCam = null;
    32.         if (FollowCamera.GetComponentInChildren<Camera>(true) != null)
    33.             tmpCam = FollowCamera.GetComponentInChildren<Camera>(true);
    34.         if (tmpCam == null)
    35.             Debug.Log("The Vehicle Camera was not found.  Please add one!", gameObject);
    36.         if (tmpCam.tag == "MainCamera")
    37.         {
    38.             Debug.Log("The Vehicle Camera is set to MainCamera.  This needs to be changed for RFPS", FollowCamera);
    39.             FollowCamera.SetActive(false);
    40.             this.enabled = false;
    41.         }
    42.         FollowCamera.GetComponentInChildren<Camera>(true).enabled = false;
    43.         FollowCamera.GetComponentInChildren<AudioListener>(true).enabled = false;
    44.         if (this.tag != "Usable")
    45.         {
    46.             Debug.Log("The tag of this object should be set to Usable to work with RFPS", this);
    47.             this.enabled = false;
    48.         }
    49.         m_MainCamera = Camera.main.gameObject;
    50.         m_WeaponCamera = m_MainCamera.transform.GetComponentInParent<ReconfigurePrefab>().WeaponCamera;
    51.         m_WeaponObj = m_MainCamera.transform.GetComponentInParent<ReconfigurePrefab>().WeaponObj;
    52.     }
    53.     public virtual void Start()
    54.     {
    55.  
    56.         //Components on Helicopter Parent Vehicle
    57.         m_EventSystem = this.GetComponentInParent<UnityEventQueueSystem>();
    58.     //  m_VehicleStandardInput.enabled = false;
    59.         m_HelicopterController = this.GetComponentInParent<HelicopterController>();
    60.         m_Target = m_HelicopterController.transform;
    61.         //Components on Helicopter Camera
    62.         m_FollowTargetCamera = FollowCamera.GetComponentInParent<FollowTargetCamera>();
    63.         if (m_FollowTargetCamera == null)
    64.             Debug.Log("Add a VehicleCameraController to the vehicle camera!", FollowCamera);
    65.         m_FollowTargetCamera.enabled = false;
    66.         m_HelicopterController.ForwardForce = 10.0f;
    67.         m_HelicopterController.ForwardTiltForce = 20.0f;
    68.         //Exit Position
    69.         if (exitPosition == null)
    70.         {
    71.             exitPosition = new GameObject("ExitPosition");
    72.             exitPosition.transform.SetParent(m_Target);
    73.             exitPosition.transform.localPosition = new Vector3(-1f, 0f, 0f);
    74.             exitPosition.transform.localRotation = Quaternion.identity;
    75.         }
    76.         //RFPS
    77.         FPSPlayerComponent = m_MainCamera.GetComponent<CameraControl>().playerObj.GetComponent<FPSPlayer>();
    78.         FPSRigidBodyWalker m_FPSWalker = FPSPlayerComponent.gameObject.GetComponent<FPSRigidBodyWalker>();
    79.         if (m_FPSWalker.PlayerCharacterObj != null)
    80.         {
    81.             m_Body = m_FPSWalker.PlayerCharacterObj;
    82.             m_BodyClone = m_FPSWalker.PlayerCharacterComponent.fpBodyObj;
    83.         }
    84.         if (m_Body != null)
    85.             m_BodyVisible = m_FPSWalker.PlayerCharacterComponent.displayVisibleBody;
    86.  
    87.  
    88.     }
    89.     void FixedUpdate()
    90.     {
    91.         if (inVehicle)
    92.         {
    93.             if (Input.GetButtonDown("Use"))
    94.                 ExitVehicle();
    95.         }
    96.     }
    97.     //RFPS Called Action for Usable Objects - see FPSPlayer
    98.     public virtual void ActivateObject()
    99.     {
    100.         //Debug.Log ("We've Been Activated");
    101.         EnterVehicle();
    102.         inVehicle = true;
    103.     }
    104.  
    105.     //Enter Vehicle
    106.     public virtual void EnterVehicle()
    107.     {
    108.         //Debug.Log ("We Entered Vehicle!");
    109.         //RFPS Player
    110.         FPSPlayerComponent.gameObject.SetActive(false);
    111.         FPSPlayerComponent.transform.SetParent(m_Target);
    112.         FPSPlayerComponent.transform.position = m_Target.position;
    113.         if (m_BodyVisible)
    114.         { //If DisplayVisibleBody is true, then handle the body
    115.             m_Body.gameObject.SetActive(false);
    116.             m_Body.transform.SetParent(m_Target);
    117.             m_Body.transform.position = m_Target.position;
    118.             m_BodyClone.gameObject.SetActive(false);
    119.             m_BodyClone.transform.SetParent(m_Target);
    120.             m_BodyClone.transform.position = m_Target.position;
    121.         }
    122.         //RFPS Camera
    123.         m_MainCamera.GetComponent<AudioListener>().enabled = false;
    124.         m_MainCamera.GetComponent<Camera>().enabled = false;
    125.         m_WeaponCamera.GetComponent<Camera>().enabled = false;
    126.         m_WeaponObj.SetActive(false);
    127.         //Vehicle Camera
    128.         FollowCamera.GetComponentInChildren<Camera>(true).enabled = true;
    129.         FollowCamera.GetComponentInChildren<Camera>(true).enabled = true;
    130.  
    131.         //Helicopter
    132.         m_FollowTargetCamera.enabled = true;
    133.     }
    134.  
    135.     //Exit Vehicle
    136.     public virtual void ExitVehicle()
    137.     {
    138.         //Debug.Log ("We Exited Vehicle!");
    139.         inVehicle = false;
    140.         //RFPS Player
    141.         FPSPlayerComponent.transform.parent = null;
    142.         FPSPlayerComponent.transform.position = exitPosition.transform.position;
    143.         FPSPlayerComponent.transform.rotation = exitPosition.transform.rotation;
    144.         FPSPlayerComponent.gameObject.SetActive(true);
    145.         if (m_BodyVisible)
    146.         { //If DisplayVisibleBody is true, then handle the body
    147.             m_Body.transform.parent = null;
    148.             m_Body.transform.position = exitPosition.transform.position;
    149.             m_Body.transform.rotation = exitPosition.transform.rotation;
    150.             m_Body.gameObject.SetActive(true);
    151.             m_BodyClone.transform.parent = null;
    152.             m_BodyClone.transform.position = exitPosition.transform.position;
    153.             m_BodyClone.transform.rotation = exitPosition.transform.rotation;
    154.             m_BodyClone.gameObject.SetActive(true);
    155.         }
    156.         //RFPS Camera
    157.         m_MainCamera.GetComponent<Camera>().enabled = true;
    158.         m_MainCamera.GetComponent<AudioListener>().enabled = true;
    159.         m_WeaponObj.SetActive(true);
    160.         m_WeaponCamera.GetComponent<Camera>().enabled = true;
    161.         //Vehicle Camera
    162.         FollowCamera.GetComponentInChildren<Camera>(true).enabled = false;
    163.         FollowCamera.GetComponentInChildren<AudioListener>(true).enabled = false;
    164.         //Helicopter
    165.         m_HelicopterController.ForwardForce = 10f;
    166.         m_HelicopterController.ForwardTiltForce = 1f;
    167.         m_HelicopterController.TurnForce = 3f;
    168.         m_HelicopterController.turnForcePercent = 1.5f;
    169.         //   m_VehicleStandardInput.enabled = false;
    170.         m_FollowTargetCamera.enabled = false;
    171.     }
    172. }
     
    Last edited: Feb 2, 2021
  14. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    So Im using a older version of rfps in unity 5.4 of3 At the time the creator used legacy particles (They work completely fine) but I started messing with some new particles in the shuriken particle system that I wanted to replace the old ones with. I tired this out but the new particles always simulate and if I add a destroyer it completely destroys it of course (thought the particle was being cloned) tried adding a duration but of course time ran out and the particle would never play again.

    I noticed that the legacy particles seem to play the simulation once after hitting flesh, stone, grass and then resets until something gets hit again. I would like to replicate this with the new particles if anyone knows how.
     
  15. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi all,

    I have updated my main shooter project to Unity 2020.1.7f1 (supposeddly stable but containg numerous known issues of course)... which is still causing me some headaches but somewhat better than my previous version of 2020.1.0b.

    I just wanted to ask if anyone else is using a Unity 2020 + version and is using the new Input Manager package as opposed to any older version of the input manager from versions prior to 2020 + and if so does it cause any issues? I am still using the Older Input Manager...

    In Player Settings I am still using Net. 2.0 setting as using NET 4.0 causes loads of errors in 2020.1.7f1 for me.

    Reason I am asking is I am having this error message :
    Error detecting Visual Studio installations: System.ArgumentNullException: Value cannot be null.
    Parameter name: input
    ............then a load more error code to follow that which is too much for me to correct....

    No idea why this occurs as I simply installed the Unity version with some difficulty even doing that, but it does not stop Unity editor working or the game from running as of itself so I am not particularly bothered about it other than it may cause other issues to occur - many of which I am continually fixing one way or another. Pain in the butt is Unity these days.

    Any advice is welcome but No Wiorries.

    Hope you are all well.

    Peter
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    Hi @petercoleman - I recommend not using the new Input System package with RFPS. RFPS would require a lot of changes to support the new Input System. Use the built-in Input Manager.

    For the Visual Studio errors, try updating Visual Studio. If you're using VS Code, you could also try updating the VS Code support package in Unity's Package Manager.
     
  17. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    ProBrStalker,

    I have various vehicles in my project that the Player either drives or controls. e.g. cars, helicopters, space vehicles.

    Sorry I am not a great programmer so as to help but I can give you this overview of the basic things I do to get the Player to contro lhese things...

    I use various components I put "Together" which may differ slightly in each case but the priciples are much the same.....

    I use free assets from the asset store for ground vehicles and flying vehicles (Car controller or Helicopter controller) and I also have Creppy Cats scifi pacakge which comes with controllers for both types of vehicles, on the ground and in the air.

    I mix and match whats needed together with any additional stuff I have to make up to make these things work..

    What I do is this...Get a suitable controller asset for example Helicopter. Ususally these have a demo scene so you can test the basic system out with the supplied system. (Cameras and so on) Yes....Now as long as it works and you can control the vehicle you are in business...

    Make a duplicate of the supplied scene and prefab if there is one, rename them and use them as unpacked and keep the originals safe and dont change those. Use your copies.

    Now there are different ways to achieve the end goal. Basically I will use the working vehicle duplicate as my own new prefab....

    Where the RFPS Player approaches the vehicle door I will place a Trigger.

    The Trigger will hold some scripts to activate or deactivate any other objects as required. (Activate Object Script)

    It will deactivate the Player Camera (Camera Main) and activate the Vehicle Camera (Camera Main). You can use a Camera Switch Script for this or you can just use two (Activate Object Scripts) and Deactivate the Player Camera and Activate the Vehicle Camera immediately which may be best option so the vehicle controller camera switcher (press key) is not affected......

    Now you will also have to hide some of the rest of the Player and similarly Deactivate any other RPFS Player component parts not needed such as the First Person Player body and footstep sounds and anything else you find so nothing of the RFPS Player interfereing remains whilst not finding any errors being returned....

    In principle thats the basics as if that is done correctly then the Vehicle and Vehicle Camera will take over the role of Player so you can control the Vehicle....

    Now there are some other considerations...

    With a Helicopter or similar If I have a precise destination the Player must go to I would place a Helicopter Pad or similar that the Player has to target and land the Helicopter on....There the Activation sequence is reversed and the Player Replaces the Vehicle again. Even if it requires a level change or a completely new version of the Player. The actual set up will depend upon your game design and gameplay scenarios... but the idea is fairly simple swap the Player for the vehicle in each case, however it is achieved.

    Now with vehicles that you want to get in and out of and perhaps more than once along a journey you will need do more.....

    In my case for example driving a car...Additionally I want to get in and out so my Car Controller has a script for that by using a Key Press - the key indictaed I change suitably to match with the RFPS Player Hide all Weapons Key so that when the RFPS Player enters the car his weapons are also hidden. As the key is a "Toggle" key when the Player presses the key again the car stops, he exits the Car and his weapons are again displayed.....

    Now if you use the Original Trigger(s) which activate all of these things at start of sequence you can actually attach them to the Car (vehicle) if need be - one at each side of the of the vehicle if you wish so the Player can get in and out either side. The Triggers will then always be where the Vehicle is situated so will always be available for use. The Car asset also has in the demo a default scene camera Yes. and there will be a place in the Car controller settings indicating the default scene camera "Player Main Camera" (as opposed to the vehicle cameras) for switching between them so when the Player gets out of the car the default Main Carera is used so instead of the defauilt scene camera we need to indicate the RFPS Player Main Camera is to be used as the default when the Player exists the vehicle.

    Lastly I believe the Car controller has a "Get In" position maker at either door so it knows where the "Player" needs to be placed before getting in or when getting out, otherwise one would have to attach the RFPS Player or have the Player follow the car at a set position distance near it for when he gets out.

    I also have some scripts for follow objects and switch cameras amongst others separately and its a matter of using what works in each case.

    Sounds complicated I know but it is and it is not - just building blocks really so just do one thing at a time then add to it to cpmplete a working system....

    To be honest I have so many things I have made work that most of the time I cant even remember how I got them to work until I dig in and examine what I had done a long time ago :)

    It may be easiest to buy off the shelf assets that work out of the box but whether or not you can get them to work with RFPS and Unity is another matter.

    Hope that helps someone at least with some basic ideas.

    Regards

    Peter
     
    ProBrStalker likes this.
  18. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi TonyLi,

    That was a quick response.

    Thanks very much for the advice re the new input manager.

    As to the Visual Studio thing Not sure why Unity does not update it to whatever it needs and I have no idea even what VS Code is :)

    I seem to have a shedfull of Visual Studio installs on my hard drive and know not why I need multiple versions taking up so much needed space....

    But then again Microsoft/Unity who knows whats going on there :)

    As I intend to attempt Update Unity again when the 2020 LTS version comes along (with issues I guess) I may ignore it until then. As far as I am aware it is causing no issue and my project still works...

    I only ever use Notepad ++ for any scripting where neeeded.

    Thanks again.

    Peter
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    It's just the way Visual Studio installs. Microsoft recommends not uninstalling older Visual Studio versions. All Visual Studio versions share many files. If you try to uninstall an older version, it will break all installed versions more often than not.
     
  20. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi TonyLi,

    I guessed that would be the case so would not have done that anyway....

    As it happens strangely enough I have been for the last day again finding and fixing more errors appearing in the console as well as trying to develop something more along the way............

    The strange part is that just a few minutes ago I shut down Unity as I had found that for about an hour or so any console errors had dissapeared and not returned despite my best efforts to put Unity and my levels to produce some via gameplay....

    In fact no messages appearing in the console at all :) perhaps I should have kept Unity and my project open forever while the going is good :)

    I expect them to pop up again when I do my next test which is to shut down the computer and restart, reboot Unity and wait for some more errors :)

    The fun of it eh!

    Thanks again

    Peter
     
  21. undyne421

    undyne421

    Joined:
    Feb 7, 2021
    Posts:
    2
    Hi

    I'm using Unity 2017.3.1f1 and realistic fps prefab 1.23 i got this error Assets/RFPSP/Scripts/AI/AI.cs(625,2): error CS1525: Unexpected symbol `}', expecting `;'

    here's the code :
    618 }
    619 }
    620 }
    621 }else{
    622 StartCoroutine(StandWatch());
    623 return false;
    624 yield break
    625 }
    626 yield return new WaitForSeconds(0.3f);
    627 yield break;
    628 }
     
  22. undyne421

    undyne421

    Joined:
    Feb 7, 2021
    Posts:
    2
    nevermind I fixed it
     
  23. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    I have now updated my Unity 2020.1.17 with the latest version of UMA and apart from some niggling errors in the console that are not mission destroy critical it would seem, things are running OK in game despite the error messages.

    I would like to fix them at some stage of course.

    I have always used UMA characters without any serious errors. These are integrated with the RFPS system and the UMA is a child of the RFPS AI as a parent. LipSync Pro is attached to any taliking characters too....(both that and TSAI are also now depreciated - not helpful is it)....

    I have quite a lot of Characters in my levels and in some numerous UMA characters. In many instances as my levels are Zoned so I activate or deactivate Zones and sometimes just Characters with Activate Object triggers and have always done so.

    Anyway I now have an error in console when using Activate Object triggers for UMA Charascters.

    ************

    Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks, rendering callbacks or OnValidate. You must use Destroy instead.
    UnityEngine.Object:DestroyImmediate(Object)
    UMA.CharacterSystem.DynamicCharacterAvatar:Awake() (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:393)
    UnityEngine.GameObject:SetActive(Boolean)
    UnityStandardAssets.Utility.ActivateTrigger:DoActivateTrigger() (at Assets/Standard Assets/Utility/ActivateTrigger.cs:64)
    UnityStandardAssets.Utility.ActivateTrigger:OnTriggerEnter(Collider) (at Assets/Standard Assets/Utility/ActivateTrigger.cs:92)

    ***********

    This error does not stop Unity or The UMA Character from working and the level running at all but as with some other error messages I would like to fix it at some time...

    Problem is I do not even know where to find the offending code...

    i.e.

    Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks, rendering callbacks or OnValidate. You must use Destroy instead.
    UnityEngine.Object:DestroyImmediate(Object)


    That I cannot find reference to in either any console error message mentioned UMA or Unity Activate scripts I am using so dont know where Unity is finding it. This I cannot find anywhere in the scripts UnityEngine.Object:DestroyImmediate(Object)

    I have looked variations of UnityEngine.Object:DestroyImmediate(Object) errors on the web but they are not specific to my issue. I am not even sure which line(s) of code are offending even or where to find them. The console message is not very helpful to me probably because I am a bit Slow :)

    Not sure if its a Parent/Child thing related?

    Apologies : There seems to have been a Green Smiley inserted by the forum instead of a D in Destroy.

    Any help is appreciated, but No big deal, No worries.

    Here we go again - time for another backup of my project so another three and a half hour wait :)

    Peter
     
  24. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    Hey, Pete, we would highly recommended upgrading to 2017 4.40, (LTS) that is now the most stable from 2017 versions, since in our experience with many different assets used in the project - it throws almost no errors ever, of that kind, so our opinion is: you haven't done anything wrong with the code, but that Unity version you use may be the cause. Worth trying perhaps, to do that first, in one extra copy of your project and see what happens, prior anything else, since versions 2017 1. etc have been throwing a lot of exceptions due to that (well-known) Unity versions bug, etc, hope it helps :).
     
  25. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi OZAV,

    My Unity Version is later than 2017 4.40, (LTS) so I am waiting for 2020 (LTS) and am busy preparing for moving to that as hopefully that will at some stage be a Stable release I can work with ongoing...

    I have been ironing out some issues I had....

    Clearly with a large complex project and so many integrated assets that ideally we would want to rely upon being updated ongoing as they have not been but rather the opposite then issues I guess can be expected in any case - notwithstanding those bugs that exist in Unity versions continually....

    I use RFPS/UMA/LipSync Pro/ all integrated and I also use Tactical Shooter AI. The only one of these not depreciated is UMA so things can be increasing difficult ongoing I guess. If I can get a stable Unity 2020 (LTS) I will stick with that if I can...

    Of course I also use numerous other systems - some others for AI, other dynamic objects and pathfinding and so on.

    UMA I wanted to update badly to the latest as its much improved...

    In recent months I had a lot of problems and issues creeping compounding one upon another from some unknown reason so had to update to 2020. 1.17 Stable (with bugs) as my project was slowly disintegrating..

    I had issues recently as specified above here in the forum...Things like RFPS default Soldier bad not working, RFPS Spawners not working and just about everything else...Unity could not even find Visual Studio install :)

    I've been through hell for some time but where there's a will there's a way as the saying goes :)

    By isolating offending things and removing/replacing them with alternatives where possible as of just about 1 hour ago I have levels running without any console error at all...My project is now apparently all working as it should for once in a long time...

    I am not banking on it as Tomorrow is another day and bad things can pop up again, but hopefully not and I have caught any offending things needed now...

    Of course the issues I have fixed may exist in some other levels as I have a lot I will need to get through and apply similar fixes before I can get back to some more serious development again...

    I need to find somewhere in my game to add a destructible bridge I can blow up and demolish which I fancy having a go at as well as a few other things on my mind to add.

    Thanks again

    Regards

    Peter
     
  26. rainbowmirza

    rainbowmirza

    Joined:
    Jul 25, 2020
    Posts:
    21
    Can You please Suggest me any other FPS or TPS Asset Which also have Good Tutorials or is at least Easy enough to understand, I'm Currently using RFPS with CF2 But I wanna change now. I've Seen UFPS and Invector, they maybe good but they are a lot different from RFPS(They Over Complicate Everything) and Also their Tutorials are Too much Outdated. I'm Not Going to make an intense or Completely Shooting Based Game. I maybe just Need a Pistol, a knife and a Perfect Controller Which will look Astonishing. I have a Story in my mind which don't includes much Shooting, it's more of Exploring and Completing Some Tasks. Any Suggestions for Controller Please...
    Thanks in Advance! :)
     
    Last edited: Feb 13, 2021
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    Each asset has its pro's and con's. Play their demos to get an idea of how they feel to the player. Watch tutorials, keeping in mind that it's OK if a tutorial is old as long as its content it still relevant to the current version of the asset. Check out the support materials: documentation, forum, discord, etc. That should help you make a decision. Good luck!
     
  28. rainbowmirza

    rainbowmirza

    Joined:
    Jul 25, 2020
    Posts:
    21
    Thank You For your Reply Tony, It have been two weeks I was Finding a Template for my Project, Finally, Now I'm Planning to buy this: https://assetstore.unity.com/packages/templates/systems/horror-fps-kit-82643
    Just One More Question, Will Your Love Hate Asset Work with this Template somehow?
     
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    (Please type using standard capitalization. It's easier to read, and it's easier for you to type.)

    With a little scripting, you can integrate Love/Hate to work with that kit. (This forum post also shows how to integrate Love/Hate's save system with Horror FPS Kit.)
     
  30. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Another good asset gone to the elephant graveyard. Too bad. Seems like there was a real community here. As someone else said, it would have been nice if the developer had open sourced it AS-IS and let the community carry it on (like DevDog did with theirs). This is the most frustrating part of Unity development IMHO and being abandoned by assets.
     
    Mark_01 likes this.
  31. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    As others have said it works with 2017 and 2018 without any problems and you can get it working with 2019 with some scripting changes.

    Having said that since the developer has abandoned it and vanished (their forum account is deleted, blog site is gone, etc.) you're on your own to support this with posting here and hoping someone can help.

    Personally I wouldn't use it for anything other than a demo reel, portfolio project, or something like that due to the fact that it's not moving forward. Using it in a game you sell is just going to lead to problems when it comes time to making it work with newer versions of Unity and other assets. Basically the code becomes your project to maintain along with your actual game code.

    The community thread here is great and helpful but you're just going to be piecing together snippets of code and at the end of the day you'll eventually hit a wall that you need to figure out. IMHO best to go with an active asset that has ongoing support.
     
  32. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    I got it working with 2020 pretty easily if I remember correctly and there are also a surprising amount of assets that still support RFPS. It still can and will be used for full games as it offers a complete package. Someone a bit earlier on this thread even released their Photon Bolt integration. Besides you don't really need ongoing support for an asset to be useful.
     
  33. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    All valid points here..I agree with everybody!

    Despite any issues with RFPS, Unity 2020 + and any other assets I use, some important ones recently also depreciated I still have everything in my project working albeit at the cost of some updating. I am back on track at the moment :)

    I guess it depends on what kind of game you want to make when deciding what version of Unity, and assets you use or perhaps change or update to.

    My projects contain just about anything and everything I can think of including...

    Finding any other assets to achieve what I have now in my game project is nigh impossible in any one Unity store asset no matter what the cost...I could spend many hundred of dollars to replace all of the features I have included and there's no way of knowing when any of them might be themselves depreciated at any time and I might be right back where I am now. That's just the way things sometimes pan out in game making.....always been that way....

    Anyway I cannot see any assets at the asset store that are better than I have now and none of them I am aware of state they work with Unity 2020 + versions without errors either. Many state compatible with Unity 2017 and above but that does not mean there are no issues with them in Unity 2020 +

    Personally despite issues with more recent Unity versions and hated things like the new prefab system which I have gotten used to Unity is overall better in new versions in some ways...Some assets like UMA I use are also much improved so I prefer to update to something better if I can and usually there's a price to pay for that :)

    I would like a nice framework like RFPS that does everything it does plus those things it does not and all the other things I have in my project that includes the kitchen sink and is easy to create with out of the box with little or no effort so I can work away quickly without worrying about issues, bugs and errors, however that's not very likely to be found any time soon..

    I will keep using RFPS and my current assets until I can find something better that works with improved versions of Unity or until my project stops functioning and am forced to do something about it...

    Happy days :)

    Peter
     
    Mark_01 and Bioman75 like this.
  34. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    I think it's a delicate balance that you have to be comfortable with. Like you said, no asset is perfect nor is it going to do everything you want when you want it. In some cases, abandoned assets are better than supported ones. It means they're done as far as code changes go so you don't have to worry about a new update wrecking your game. On the other hand, sometimes it's a welcome change to get new features or have an asset just automatically "work" with a new Unity subsystem (URP, Input System, UGUI, etc.).

    Ultimately it's up to you how to move forward with using an asset and everyone's reasons and choices will be different. I think you have to draw that line at some point and live with the asset as it is, otherwise you're constantly playing a catch up zero sum game. Instead of coding your game logic, you're always trying to keep your assets current and updating all the integration points. If you hook into an asset as much as some of them let you (e.g. tie a weather system to your game time) then you're always going to be fiddling around when an update comes that changes things.

    In the end it doesn't matter what route you take. Build games, get them out there, and have fun making them!

    Thanks!
     
  35. ProBrStalker

    ProBrStalker

    Joined:
    Aug 20, 2017
    Posts:
    65
    Hello guys, I'm trying to make the npc I have on the scene produce animations like this when they enter a trigger, BattleField style and several FPS games ...
    This is my script:
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class SoldierInVehicle : MonoBehaviour
    4. {
    5.     public Animator Soldier1;
    6.     public Animator Soldier2;
    7.     public Animator Soldier3;
    8.     public Animator Soldier4;
    9.     void onTriggerEnter(Collider other)
    10.     {
    11.         Debug.Log(other.name);
    12.         Soldier1.SetTrigger("Rifle_CrouchLoop");
    13.         Debug.Log(other.name);
    14.         Soldier2.SetTrigger("Rifle_CrouchLoop");
    15.         Debug.Log(other.name);
    16.         Soldier3.SetTrigger("Rifle_CrouchLoop");
    17.         Debug.Log(other.name);
    18.         Soldier4.SetTrigger("Rifle_CrouchLoop");
    19.     }
    20.     void onTriggerExit(Collider other)
    21.     {
    22.         Debug.Log(other.name);
    23.         Soldier1.SetTrigger("Idle");
    24.         Debug.Log(other.name);
    25.         Soldier2.SetTrigger("Idle");
    26.         Debug.Log(other.name);
    27.         Soldier3.SetTrigger("Idle");
    28.         Debug.Log(other.name);
    29.         Soldier4.SetTrigger("Idle");
    30.     }
    31. }
    32.  
    But it turns out that when the npcs enter this trigger nothing happens ...
    in this case, I'm working with Mecanim
     
  36. alonehuntert

    alonehuntert

    Joined:
    Oct 12, 2017
    Posts:
    15
    TonyLi can you help me? I want to kill the zombies secretly in my game, so 'stealthkill' or when I hit the head of the zombie, I want your head to be smashed.You think how can I do it?
     
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    WeaponBehaviors have a silentShots variable. If you're using a stealth weapon, set Silent Shots to true.
     
  38. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    ProBrStalker,

    I presume your "Soldier(s)" has an animator component attached with the specified animations being called indicated.

    Sorry I am not much of a programmer so not sure about your code though RFPS is very precise about its requirements and its often not easy to add or amend to it unless one is familiar with its code and can safely edit or update anything that needs to be done to achieve whats needed by a user....

    You will probably need help from someone code savvy and wiser than I :)

    Peter
     
  39. AzulineStudios

    AzulineStudios

    Joined:
    Feb 18, 2021
    Posts:
    31
    Hey this is Azuline Studios, thought I should explain more about the RFPSP. It wasn't my idea to depreciate the asset and if they claim to be the original RFPSP developer or authors of the original RFPSP asset source code, they are lying... Unfortunately the original Azuline Studios account can't be restored.

    I can still be reached at the email in my signature.

    If you're using the RFPS NPC AI, their animation state is probably being overridden by the code in AI.cs. You might need to create a state in that script specifically for crouching.

    Also, sometimes gameobjects need to have a rigidbody (or just one set to kinematic) to activate a trigger.
     
    Bioman75 likes this.
  40. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Please bring it back or open source it!
     
    WaqasGameDev and Bioman75 like this.
  41. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi AzulineStudios,

    Thanks very much for your reply and helping here :)

    "It wasn't my idea to depreciate the asset" How on earth did it happen then?

    Theres still quite a few users of RFPSP and as far as I can see its still the best out of the box solution ever made for Unity in my own opinion which accounts for little of course....

    "Please bring it back or open source it!" Please bring it back if possible :)

    I use RFPSP AI Characters that "Crouch Shoot" though not in the way asked for here I guess. I simply use a copy of a Character and change their animator and animations therein to whatever I need so can have either or as it were with a Character Stand or Crouch to shoot or whatever I need and use them place wherever I want an AI to display the appropriate behaviour. e.g. Crouch shoot near Boxes or other obstacles or even in open areas so one may attack standing and another Crouch to have a number of the same type of character behaving differently at one time in view. Makes a big difference in gameplay having them behave differently.

    Changing an individual characters weapons can also add variation, rifle, pistol and so on and I guess perhaps giving one a lay down Prone Shoot animation, for a Sniper enemy or alike though I have not ever tried that to see if it can be done. ...I shall have to do so :)

    Anyway thanks again for your help here.

    Kindest regards

    Peter
     
  42. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Well that works. I now have another shooting behaviour :)

    And here he is. RFPSP AI Shooting Prone.

    The Character does not use an RFPS Animation as I dont think a prone animation is included so I have used one from another asset I have. Could use a little tidying up but it works.

    ShootProne.jpg


    Regards :)

    Peter
     
    AzulineStudios likes this.
  43. AzulineStudios

    AzulineStudios

    Joined:
    Feb 18, 2021
    Posts:
    31
    Thanks, due to former business partners I can't really go into detail. This is also why I can't release the RFPSP as open source or distribute it again. Not ok with this situation, honestly.

    On the plus side, I've been working on a 100% rewritten and improved FPS asset. It just needs weapon animations and inventory management. Great to see you guys still posting here.
     
    Bioman75 and Mark_01 like this.
  44. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi AzulineStudios,

    Thanks for that very much...

    Looking forward seeing your new asset....Sounds promising.

    Please keep us informed when its released.

    Thank you.

    Regards

    Peter
     
    AzulineStudios likes this.
  45. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    What you had with an inventory would be sweet! The RPG side of it is what I used for some of my demos!
     
    AzulineStudios and Bioman75 like this.
  46. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    If its as easy to use as RFPS with extra features I am very excited. Will this be published under AzulineStudios? Whats the expected ETA and price point?
     
    Last edited: Feb 22, 2021
    AzulineStudios likes this.
  47. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    I use S-inventory with the help of @TonyLi and it's great. Something like that would be awesome!
     
  48. alonehuntert

    alonehuntert

    Joined:
    Oct 12, 2017
    Posts:
    15
    First of all thank you for your comment, but that's not what I want, as in the picture below, sneak up from behind and kill unaware.
     

    Attached Files:

  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,698
    Now that Azuline Studios is back, maybe they can provide a better answer.
     
  50. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Let's have the great Tony Li integrate quest Machine with it!!!
     
    AzulineStudios likes this.