Realistic FPS Prefab [RELEASED]

Question about the raycasting eyeline on monsters,
So I have all my monster built on the Zombie monster and they all work very well. Then one day I noticed that all of a sudden my monsters don’t charge in and attack like they did. No idea why or what changed. Then I checked “draw debug gizmo” and it shows the eye line pointing off into space. I think just a simple adjustment of changing the raycast eyeline of the characters would fix this. BUt for the life of me, I cannot figure out how to change the eye line position. Rotation of the character models doesn’t seem to work. In fact nothing does.

Does anyone know how to change the eye angle of the monster?

Screen shot. You can see the eyeline from my monster shooting off into space to the right, but instead should be looking straight forward down the hall…

Update: Looks as if three of my monsters are all looking at the same point in space. Not sure how this happened. Most likely I made them all from same “root” zombie monster… Anyone know how to control this?

The debug line doesn’t show the direction that the monster is looking. It’s a line between the monster’s eyes and the last visible target position.

Ehi, I have this error in the last version of Realistic FPS Prefab (1.42), using Unity 2017.1.1.

Assets/RFPSP/Scripts/Camera/VerticalBob.cs(95,28): error CS1061: Type WeaponPivot' does not contain a definition for PlayAnim’ and no extension method PlayAnim' of type WeaponPivot’ could be found. Are you missing an assembly reference?

Back up your project, then delete your old RFPSP folder and reimport the latest version. VerticalBob.cs was removed in the latest version; that’s a leftover from a previous version in your project.

Hey guys,

I’m currently evaluating the available character controllers for my next project, where I’d like to have some seemingly non-standard movement options for the player - I can luckily completely reject the weapons part, though I’m quite impressed with what RFPS has to offer in that regard. The demo is also fun.

Anyhow, on to the movement part: Is there something prebuilt or something that would keep one from rolling my his own solution for letting the character do a roll to one side (for dodging)?
Can the player camera turn independently around the y-axis, so that the player can look over his shoulder while still controlling the character as if he was looking ahead?
How about wall-running, ledge-hanging and all that crazy Prince of Persia-esque stuff?

Thanks!

This is just my personal opinion, so please take it as only one small voice among many. RFPS hard-codes many things to give the controller just the right feeling that makes the demo so fun. But the disadvantage is that this makes it quite difficult to extend with new movement types such as ledge-hanging.

Thank you @TonyLi , I appreciate your input :slight_smile:

[ I’m copying this from the Dialogue System thread: ]

Hi @ZomBJ - You don’t need to use the steps in “How to Respawn With Saved Data”. Instead, edit RFPS’s FPSPlayer.cs. Add this to the beginning of the Die() method:

void Die () {
    if (PixelCrushers.SaveSystem.HasSavedGameInSlot(1))
    {
        PixelCrushers.SaveSystem.LoadFromSlot(1);
        return;
    }

This assumes that your checkpoint save is going into save slot 1. If you’re using a different slot number, replace “1” with that slot number.

Note that whenever the RFPS player starts, it will check for a game in slot 1. If you’re restarting the entire game from the beginning, you’ll want to delete the checkpoint save in this slot by calling PixelCrushers.SaveSystem.DeleteSavedGameInSlot(1).

1 Like

Hi,

So I’m noticing that when the asset is imported, it wipes out my Horizontal axis on my project settings > Input settings

This is affecting other things inability to interact. Is this supposed to happen? Or is it a side effect?

It’s intentional. RFPS is a Complete Project asset, which means it replaces the project’s settings (input, tags, layers, etc.). You’ll need to re-add your Horizontal and Vertical axes.

1 Like

Hello,

I am currently attempting to integrate the “Easy Doors” asset into my game with your use system. By any chance have you done this before? This is more of a preferential system. I can easily have the doors open with a box collider trigger. But I was hoping there was a way I could make the doors trigger via the rfpsp use system rather than a box collider trigger. Any chance you happen to know how to do this? Or would it require some coding?

It requires a small amount of coding. RFPS’s interaction system calls the method PickUpItem() on targets. Set the door’s layer to a layer that RFPS’s interaction system recognizes, such as Pickups, and make sure it has a collider so RFPS’s raycast can detect it. Then add a small script with a PickUpItem() method that tells the Easy Doors script to open/close.

1 Like

Realistic FPS Prefab v1.44 just released.

Update: The Save System for RFPSP 1.0.5 (updated for Realistic FPS Prefab 1.44) has been submitted to the Asset Store. It should be available in a few business days. You can also download it here using your Unity Asset Store invoice number:
Save System for RFPSP Customer Downloads

Upgrade note for 1.0.5: You must delete your existing Pixel Crushers/Common folder before importing version 1.0.5.

Not sure of this has been asked before but how do i get rid of this error?
In order to call GetTransformInfoExpectUpToDate, RendererUpdateManager.UpdateAll must be called first.

Anyone know if there is any information published regarding what this latest version of RFPS Prefab includes? I have not seen any and have perhaps missed it?

Thanks

Peter

Just the release notes on the Asset Store:
1.44
-Fixed missing Project Settings in uploaded versions.

1.43
-Fixed AI initialization in Unity 2017.2.
-Removed HUD GUITextures and GUITexts and replaced with UI Canvas.
-Fixed stuck arrows becoming unaligned in Unity 2017.2.
-Added unarmed player character animations.
-Added allowFirstPerson var to CameraControl.cs for third person only games.

1.42
-Removed unused animation events for Soldier@walk animation in Unity 5.2 package version.
-Fixed player model in third person mode not playing shooting animations when strafing, running, jumping, and firing.

1.41
-Fixed spinning of weapon model roll angles when setting up new weapons with certain models.
-Raised third person camera height when zoomed and swimming to better match camera height when not swimming and zoomed.
-The third person camera sphere cast now ignores objects with the “Usable” tag to prevent arrows from blocking camera.
-Added extra check to PlayerWeapons.cs to prevent weapon switching if toggle camera button is being held.
-Added fpTorsoAlwaysAims var to PlayerCharacter.cs to allow player model to always aim in first person mode (shadow will always aim in look direction).
-Fixed incorrect weapon rotation if Remove Prefab Root was unchecked.
-Added new tutorial for changing the player model to documentation.

1.4
-Removed VisibleBody.cs and replaced with PlayerCharacter.cs, which animates player character model in third person and creates and animates first person visible body model.
-Added ThirdPersonWeapons.cs script which holds assets used for third person weapons.
-Updated animations to use Mecanim and removed all legacy animations.
-Removed HorizontalBob.cs and VerticalBob.cs and replaced bobbing effects with keyframe animations.
-Removed Perlin Noise animation of weapon models since the same effect can be achieved with new keyframe animation bobbing.
-Allowed instant kill triggers to kill invulnerable player.
-Fixed fire on release weapons not canceling after hiding weapon when climbing or holding objects.
-Can no longer drop infinite weapons in third person mode.
-Fixed frame rate dependence of pivot pitch angles.
-Fixed muzzle flash not rotating roll angle randomly.
-Added stepHeight and maxStepHeight variables to FPSRigidBodyWalker.cs to allow player controller to automatically detect steps and move up them without needing invisible collider ramps over steps (though they can still be used).
-Forward obstacle detection capsule cast now checks in move direction.
-Fixed forward obstacle detection capsule cast when crouching.
-Fixed offhand grenade not throwing if ammunition was depleted.

Can you click on the line in the Console window, press Ctrl+C to copy it to the clipboard, and then paste it into a reply here? If the message includes a stack trace, it’ll be pasted; that can help narrow down where it’s coming from.

Hi
TonyLi,

"Just the release notes on the Asset Store:
1.44
-Fixed missing Project Settings in uploaded versions. "

Thanks for that.

Great update **1.44 but there is something issue.

All UI text object used 2 time (for shadow). instate that just add shadow component should be better.
any planning for dynamic crosshair.

Hi, two questions…

How do I change the NPC FOV, to make NPCs not be able to see me if I’m outside their “view cone”? It seems to be set at 180 or so, and I can’t figure out if it can be changed.

And how can I turn off the player FOV change when I sprint?

True. But the 2 text objects allow you to have additional effects, too. If you want to switch to UI’s Shadow component, you can just disable the shadow object and add a Shadow to the main object.

Adjust the value on line 712 of AI.cs:

if(Vector3.Dot(toTarget, transform.forward) < -0.45f){

Inspect FPS Main > FPS Player > Iron Sights and change Sprint Fov to the same value as Default Fov.


Save System for Realistic FPS Prefab 1.0.5 Available

The Save System for RFPSP 1.0.5 is now available on the Asset Store! Just drop one component on FPS Player to save the player’s stats, inventory, and location. This update adds some new, helpful general-purpose saver components such as Active Saver (for GameObjects) and Enabled Saver (for components).