vedaloivdocs

Guide

Demos

Documentation for v1.6.03 scenes2 prefabs

Try the controller before you change anything. Three guided scenes show movement and camera, items and events, and finger grips. Each scene has an on-screen guide with its controls and live player state. Two prefabs give you a complete player in a few drags.

On this page
  1. Demo scenes
  2. Controls
  3. Ready-made prefabs
  4. Use the prefabs in your scene
  5. Use the demo scripts as templates
  6. Common pitfalls

Demo scenes#

The scenes are in Assets/FBSystem/Scenes/Demos/. Press F1 in a scene to hide or show its guide panel.

SceneWhat it shows
01_Movement_CameraWalking, sprinting, jumping and crouching. The stations are a crouch tunnel with a low ceiling (you cannot stand up under it), a ramp, stairs, uneven ground and a turn pad for re-steps when you turn in place. The panel shows the locomotion state and the events.
02_Items_EventsPicking up, switching (with the holster animation), using and dropping a one-handed flashlight and a two-handed box. The panel shows the hand state and a live feed of the C# events.
03_Finger_GripsFinger grips on both items. Press H to turn the grips off and compare them with the plain animation.

Controls#

KeyActionScenes
W A S D, mouseMove and lookall
ShiftSprint while movingall
SpaceJumpall
CCrouch (toggle)all
EPick up the item you look at02
1, 2, mouse wheelSwitch item. In 03 the keys select the flashlight (1) and the box (2).02, 03
QPut the item away02, 03
FUse the held item02
GDrop the held item02
HFinger grips on or off03
F1Show or hide the guide panelall

Ready-made prefabs#

Both prefabs are in Assets/FBSystem/Demo/Prefabs/.

FBSystem_CameraRig
The camera: a Main Camera with a Cinemachine Brain, and a Cinemachine camera. The player finds the Cinemachine camera automatically.
FBSystem_Player
A complete player with the Humanoid demo character. It has the full controller, all model IK (head, hand, spine and foot planting), finger grips, and an item container with two items: the flashlight in slot 1 and the box in slot 2. The prefab also contains the demo scripts PlayerInventory, PlayerInteraction and PlayerDropSystem. The character's first-person mesh is cut with FPCutter, so the head is hidden in first person.

Use the prefabs in your scene#

  1. Open a scene with a floor that has a collider.
  2. Drag FBSystem_CameraRig into the scene. Delete any other Main Camera.
  3. Drag FBSystem_Player onto the floor and press Play.

The prefabs reference the shipped PlayerSettings asset in Assets/FBSystem/Project/, which is tuned for the demo character. For your own character, use the Setup Wizard instead.

Use the demo scripts as templates#

The demo scripts live in Scripts/Player/Demo and use the namespace Player.Demo. They are examples and not part of the core API.

  • PlayerEventLogger logs item and locomotion events to the Console. It is not on the prefab or in the scenes. Add it to the player to see every event in order.
  • PlayerInteraction and PlayerDropSystem show pickup and drop. The interaction reads the E key and uses its Interactable Layer. In the demo this is layer 4.
  • DemoGripToggle toggles the finger grips with H.

Common pitfalls#