S&box Wiki
Home
/
Edit First Person
View
Edit
History
No Category
Developer Overview
The Project System
Publishing To Asset Party
Getting Started With Hammer
Mapping Basics
Mapping Entities
Advanced Mapping Techniques
Getting Started with Modeldoc
Animgraph & Animation
Physics
Modeldoc Nodes
Advanced Modelling
UI Basics
Styles & Stylesheets
Razor Templates
Game Menus
Materials
Built In Shaders
Shaders
Shader Reference
Sounds & Audio
Particles
Getting Started
Making Games
Input
Networking
Physics
Rendering
Editor & Tools
VR
Misc
Playing Guides
Console Commands & Variables
Dedicated Server
Log in to edit
First Person
<cat>Model.Advanced</cat> <title>First Person</title> <warning>**First-person assets are being actively worked on, and are subject to change.**</warning> The goal of the first person base is to help you and provide you with valuable tools and "starter kits", whether you are a beginner or an advanced user. If you would like to make animations for the first person assets, here are community made control rigs to get you started: https://github.com/Ali3nSystems/Ecodelia-Tools-for-Facepunch-Assets # First person arms The main model can be found here: ***addons/citizen/models/first_person/first_person_arms.vmdl*** The "base" animgraph implements standard features for the "basic" use cases (see below), and provides you with the setup & parameters the adjustment layers stuff. <warning>**Support for Animgraph groups and subgroups (which are groups-as-an-external-file) is being worked on. This base animgraph is planned to be an externally-referenceable file for you to use in your own animgraph.**</warning> <note>The current arms are "male," but there will eventually be others (the two most likely ones being "female" and "citizen"). These will probably be implemented through bodygroups, and the change in proportions will be handled through a parameter that applies a delta layer. All animations are planned to be authored on the "male" skeleton, with the delta layer being in charge of the type change.</note> <warning>While everything is being worked out, there is no standard 1st person Animator/Controller yet. You can look at Fists.cs of the official Sandbox gamemode in the meantime.</warning> #Animation setup This entire section needs to be rewritten, but here are the broad strokes for now: Only one "official weapon" is using first_person_arms.vmdl as-is: the fists. Weapons, held items, etc. should go live in their own VMDL, and copy the original skeleton over. The copied skeleton of the arms should ideally be left as-is, no changes, but you are free to add new leaves to it. You have complete free rein over what you want to do under weapon_root & weapon_root_children. Facepunch's "official weapons" are set up in such a way that the weapon root can be animated independently of anything else, and arms/hands are corrected back to match the original relative position (in weapon_root's space) through the use of IK. This lets us do a ton of cool additive layering, and offer a lot of template "shared animations" that let us test weapons quickly. You have complete freedom over the hierarchization of the skeleton. The only thing that really matters, in the end, is that the first_person_arms.vmdl bones stay in the same shape and proportions, but you could completely flip their hierarchy if you wanted to. You can link weapon_root under hand_R if you want to. The downside of doing so is that you'll break the common shared weightlists (they assume weapon_root being independent) Facepunch's "official weapons" rely heavily on additive animation, which may seem a bit unintuitive at first. However, this comes with a ton of benefits with regards to compositing, and lets you reuse animations across different weapons super easily (hence the "shared" template animation set) Remember that the hierarchization of your animation control rig and of the final output skeleton (what you export out of your 3D software) do not have to be the same. #Standardized parameters These parameters should ideally be the same between all weapons. Unfortunately there is no way yet to have referenced & shared lists of prefabs and tags between different animgraphs and subgraphs, so as of the time of writing, this is a completely manual process that involves copying and pasting guts of the files manually. ## Parameters `move_x/y/z`, `move_groundspeed` ... `move_cycle_control` ... `aim_pitch_inertia`, `aim_yaw_inertia` Used to create drag and follow-through in the animation. This parameter uses the current angular velocity of the player's aim. **NOTE:** plans are being made to implement a different damping mode that would bounce and overshoot physically. `aim_pitch` `aim_yaw` Used for tweaking the weapon pose as you away from the center. *(This means only the pitch one is of any real use 99% of the time... unless you implemented a moving crosshair kind of thing.)* `insert skeleton delta parameter here` ... ## Finger adjustments (from prefab) `FingerAdjustment_[A]_[B]` Where A is the hand followed by the finger number (R2 is right index, L4 is left ring), and B is the type of adjustment: Bend, Curl, Roll, Spread. This is an arrangement that's very inspired by the CAT rig system in 3ds Max. ## Weapon adjustments These used to be a thing but now they aren't, they need to be replaced ## Hand pose adjustments Not implemented yet. ## Exporting parameter values You have to copy these over by hand. We should include a way to export current parameter values (as previewed) to your clipboard, or even better, as the C# code so you can copy/paste easily to your first person code. # Driving the camera ## Through animation Use the camera bone. (add code here) ## Through code (add code here)
S&box Wiki
Development
Developer Overview
6
Editor Overview
General FAQ
System Requirements
The s&box wiki
Troubleshooting
Useful Links
The Project System
4
Adding Assets
Creating a Game Project
Project Settings Window - Games
Project Types
Publishing To Asset Party
2
Uploading assets
Uploading projects
Hammer
Getting Started With Hammer
3
Getting Started With Hammer
Making Your First Map
Mapping Resources
Mapping Basics
7
Cordons
Hotspot Materials
Selection Sets
Standard Mapping Dimensions
Tool Materials
Tools Visualisation Modes
Using Entities That Require a Mesh
Mapping Entities
2
Creating a Door
Light Entities
Advanced Mapping Techniques
8
Collaborating With Prefabs and Git
Instances
Prefabs
Quixel Bridge Plugin
Tilesets
Tilesets-Advanced
Tilesets-Proxies
VIS Optimizations
Models & Animation
Getting Started with Modeldoc
7
Automatic Model Setup
Breakpieces
Creating a Model
Guide to Models
Importing Rust Weapons
LODs
ModelDoc FAQ & best practices
Animgraph & Animation
4
Animations without Animgraph
AnimEvents, AnimGraph Tags, Attachments
Animgraph
Delta Animations
Physics
3
Cloth Physics
Collisions, Physics & Surface Types
Jiggle Bones
Modeldoc Nodes
1
Custom ModelDoc nodes
Advanced Modelling
6
Bodygroups
Citizen
First Person
IKChains and Stride Retargeting
Morphs
Vertex Normals
User Interface
UI Basics
7
Custom Fonts
Embedding Websites
Enabling Pointer Events
Events and Input
Localization
UI Basics
UI with Components
Styles & Stylesheets
1
Video Backgrounds
Razor Templates
4
A Razor Overview
Aliases and SetProperty Attributes
Generic Components
Templates
Game Menus
1
Making a Custom Pause Screen
Materials & Shaders
Materials
5
Guide to Materials
Material Attributes
Material Resources
Texture Settings
Using Dynamic Expressions
Built In Shaders
2
Foliage Shader
Glass Shader
Shaders
4
Compute Shaders
Constant Buffers
Material API
Shading Model
Shader Reference
5
Anatomy of Shader Files
Getting rid of Tex2D macros
Shader Reference
Shader States
Texture Format Cheat-Sheet
Other Assets
Sounds & Audio
3
Guide to Sounds
Sound Events
Soundscapes
Particles
5
Creating animated sprites
Creating your first particle effect
Understanding Particle Editor
Using custom sprites
Using particle systems from C#
Coding
Getting Started
5
Cheat Sheet
Learning Resources
Setting up Rider
Setting up Visual Studio
Setting up Visual Studio Code
Making Games
2
Components
GameObjects
Input
4
Commands
ConVars
Input System
Speech Recognition
Networking
7
Auth Tokens
Http Requests
Lobby System
Networked Types
Networking Basics
RPCs
WebSockets
Physics
5
Collisions
Hitboxes
Joints
Traces
Triggers
Rendering
3
Render Tags
RenderHooks
Scenes
Editor & Tools
7
Creating a Tool
Custom Asset Types
Guide to Widgets
Hammer API
Hammer Gizmos
Hotload Performance
Widget Docking
VR
3
Getting Started
VR Input
VR Overlays
Misc
13
Asset Types
Attributes and Component Properties
Backend API
Cloud Assets in code
Code Accesslist
CPU Performance Profiling
DisplayInfo
FileSystem
Mounting assets at runtime
package/find
Setting Up A Navigation Mesh
Threaded Tasks
TypeLibrary
Playing
Playing Guides
3
Default Keybinds
Proton
s&box on macOS (Experimental)
Console Commands & Variables
1
Launch Arguments
Dedicated Server
1
Dedicated Servers