FX Camera Systems

For UNITY 3.4

(Formally known as “FX Camera System”)

Daily Build Notes 1.5.1
New Features:

  1. Added a fatigue condition for Head Bob. Currently this is true or false and can be set in the inspector under “Current Controller State”. It can be called by referencing FX_Character_Controller.IsFatigued.

1a. This feature can be enabled / disabled under Player Settings → Player_Motion_Settings → HeadBob Settings → Enable Fatigue Head Bob.

1b. This feature has two Head Bob settings “Rested” “Fatigued”

1c. This feature currently applies to motion states Standing, Crouch, Prone, Climbing.

Fixed:

  1. Restored Head Bob for climbing

Short Term WIP:

  1. Make the transitions between Head Bob state changes smoother.

!!!IMPORTANT!!! Setup your layers Tags:
LAYERS:
8 = Ignore Camera
9 = Ignore CameraWeapon
10 = Ignore Weapon
11 = Ignore Interact
12 = Render Weapon
13= Render GUI
14 = Ground
15 = Player
16 = AI

TAGS:
0 = Ground
1= Water
3 = WaterSurface
4 = Ladder
5 = Activator
6 = Door
7 = Interactive

FX Game Development Tools is an easy to implement system that currently consist of:

  1. Three camera / gameplay styles. (First Person Action, Third Person Action, Third Person RPG)
  2. Projectile weapon system
  3. Object interaction system
  4. Special effects properties editor

The Camera Gameplay Styles

First Person System:
This is a basic first person camera setup.

Third Person Action System:
This camera system acts much like the camera system in most third person Action based RPG Shooters like Mass Effect. This system can use two camera locations. One for out of combat and one for in combat. The out of combat camera is placed behind and above the player actor and allows the camera to be moved in and out via the mouse wheel. The in combat camera snaps to behind and to the side aka over the shoulder view and is locked to it’s current distance behind the player.

Third Person RPG System :
This camera system acts much like the camera systems in most modern 3D isometric RPGs like Dragon Age. The cameras rotation is controlled by holding the RMB and moving the mouse. The camera can be moved in and out by using the Mouse Wheel. The player actor can be commanded to move to a position by clicking the RMB on the ground surface.

The Projectile Weapon System
The projectile weapon is a raycast based solution. The system works by shooting a ray out from the center of the screen Aka the screen reticule and collecting the hit.point. The actual weapon will then orientate to look at this position. Because this creates two line of sights (camera to target and weapon to target) only the camera to target is used for projectile collision information. This leaves the weapon to target line of sight to shoot a simulated projectile towards the target. This is just a visual and has no impact on anything. Some examples would be the bootcamp demo with unity and mass effect both use this method for solving the third person line of sight offset issue.

Object Interaction System
The object interaction system uses an object known as an “Activator” to interact with objects in the game world. While “Activators” are currently limited to interacting with doors and lights, they will be expanded to allow interaction with any other set pieces that require a form of user interaction.

Special Effects Editor
The special effects editor simply allows a quick and easy way to control the way an instantiated prefab effect or projectile is handled.

Setting Up A Ladder

  1. Import the object your wish to use for your ladder and place in the game world.
  2. Apply a Zone_Ladder prefab and set as a child of your ladder.
  3. Set the Zone_Ladder “Z” direction to be facing into your ladder object. (Very Important)
  4. Position the Zone_Ladder to be just in frond of your ladder object.
  5. Scale the Zone_Ladder to the height and width of your ladder object.
  6. Scale the depth of the Zone_Ladder to be big enough for your player to enter the Zone_Ladder.

Current Features FX_Character_Controller.js

  1. Three Camera Styles
  2. Camera Occlusion
  3. Camera Orbit / Dolly
  4. Camera Zoom
  5. Change Camera (Two camera option)
  6. Dynamic Reticule Mouse Cursor

Current Features FX_Weapon_LineCast.js

  1. Three Shooting Styles
  2. Weapon Range, Rate Of Fire, Reload Times, Damage
  3. Shot Scatter Amount
  4. Accuracy Boost
  5. Weapon Firing Effects
  6. Weapon Impact Effects

WebPlayer DEMOS

First Person Action DEMO
Third Person Action DEMO
Third Person RPG DEMO
Isometric DEMO

First Person Aaction Third Person Action DEMO Controls:
Move: WSAD + Mouse
Run: Left Shift
Jump: Space
Fire: LMB
Lean Left / Right: Q , E (First Person Action Only)
Change Pose: Left Ctrl (First Person Action Only)
Stand Up: Z (First Person Action Only)
Hold To Prone: V (If set to hold to enable, First Person Action Only )
Hold To Crouch: Left Ctrl(If set to hold to enable, First Person Action Only)
Interact: F
Change Camera: C
Change Fire Style: M
Dolly Camera: Mouse Wheel (Third Person Action / RPG Only)

Third Person RPG Controls: (Dragon Age Style)
Move: WSAD or RMB click
Run: Left Shift
Orbit Camera : Hold RMB (Move mouse)
Dolly Camera: Mouse Wheel
Interact: RMB click

For UNITY 3.4

Thanks to Hovrak for inspiration in the design of the logo :slight_smile:

Internet Explorer 9 users. If you are having problems downloading files from the fourm please enable Compatibility View

625962–25309–$FX_GDT_v1.5.1.unitypackage (3.23 MB)

Fantastic, thanks for this!

This is great, It was a bit of a pain that its a custom move script, that was the only let down for me but its a great package!

@Ben4views: The current move script is really there to support the ThirdPersonRPG system. The camera script sets JumpEnabled = false, and allows a right click on the ground to move. You should be able to create your own move script and re-incorporate the MouseMove() function or wright your own. As this is the only function that is required for the ThirdPersonRPG mode.

If you need help with anything let me know i’ll try to help best i can.

I’m not all that happy with the current move script my self so i will be focusing my attention to that next as it was really just a means to an end to get the camera system up an running.

Thanks for sharing this :slight_smile:

Thanks for sharing ! :slight_smile:

v1.1 Update coming soon.

New features:

  1. Interact with objects under onscreen reticule if within a defined range. (first person third person action)
  2. Interact with objects under mouse cursor if within a defined range. ( third person rpg)

The interaction with objects will require some coding by the programmer so the desired effect can be achieved. This is providing the means to get the object to be interacted with.

  1. (optional script) Linecast weapons with support for custom projectile effects, muzzle flash effects, impact effects, and more.

The linecast weapon script works by shooting a ray out from the center of the screen Aka the screen reticule and collecting the hit.point. The actual weapon will then orientate to look at this position. Because this creates two line of sights (camera to target and weapon to target) only the camera to target is used for projectile collision information. This leaves the weapon to target line of sight to shoot a simulated projectile towards the target. This is just a visual and has no impact on anything. Some examples would be the bootcamp demo with unity and mass effect both use this method for solving the third person line of sight offset issue.

Nice stuff ! good work…and thank’s for sharing!!

New Release v1.1

This release mainly focuses on the linecast weapon systems “shooting”. Fundamentals for object interaction have been deployed but largely have no effect ATM.

Web Demo

Controls:
Move: W,S,A,D
Jump: Space
Run: L-Shift
Change Camera: C
Shoot: LMB

New Features:
1.Linecast weapon system
Weapon systems include the FX_Weapon_Linecast properties editor, FX_SFX properties editor, and FX_Object_Properties editor.
2. Foundation for Object interaction implemented.
(Object interaction requires the FX_Object_Properties script to be on the object to be interacted with.)

Included sound files come from soundbible.com

Documentation will be updated on the first post in the next few days.

Thanks, very well made and very useful.

It would be nice to add a walking sound different for each Object properties Type (metal, concrete, wood).
Thanks again!
Max

@SJM Tech: That’s a very good idea. I’ll get that included in the next release.

Fantastic!.
If you want another tips i think that:

  • the name “FX Camera systems” don’t give justice at your “All in one and Multi-purposes Controller” (FX Camera sound like any camera post processing effects)
  • add a reticule variation when object interactions are avaible (other reticule texture or color variation).
    -add a smoothing factor for the mouse free look (FPS)
    -add a(vertical) ladder climbing system.
  • add a crouch ability.

@SJM Tech: Nice list. Yes the content has out grown the name so it will be changing soon. Most of the other features will be included when I get a proper motor script written. Keep the ideas common.

@ Sjm Tech: I actually have a ladder climbing system from a previous fps script I was working on a while back. I will have to try to get it integrated into this package. It should work quite well for the First Person and Third Person Action portions.

Update v1.1(3.4)

This version is compatible with Unit 3.4.

Resolved:

  1. Fixed warning message about out dated scripting method.

Compatibly with 3.3 after this change is unknown.

Nice news…thanks!

The camera system works great! I have a couple of suggestions for the third person shooter camera.
-Make it so that the gun points towards what the player is aiming at.
-I really like the way the camera goes into a first person-style view when you back the camera up into the wall, but the camera clips through the player’s geometry on the way. See if you can make the capsule “fade out” as the camera moves into it.

@Llama Fragments: Thanks for your feedback.

  1. Actor fade - I’m not sure of how to do the fade in/out in a proper way. It is something I want to look into. The current system should have the player actor mesh.renderer going into a disabled state once the camera gets so close so it won’t clip. If it’s clipping I’ll have to check it’s settings to make sure the disable distance didn’t get changed to 0. I’ll check this out when I get home.

  2. Weapon aim - This is something I am working on. Right now I didn’t want the gun moving with a capsule as the player actor. Im working with the construction worker as the player actor to have it drive the look direction of the weapon. This way the actor will control the orientation of the weapon instead of the weapon moving independent of the actor.

Any other ideas or comments please let me know.

Yeah, I guess it does make sense to let the animations handle the movement of the gun.
But here, in this example project there’s a script called FadeoutLineOfSight that I used for a game a little while ago, and you could probably change the code around to fit this purpose.

Nice thanks for the link. I’ll check it out once I get off work.