branchrust_reboot/main/viewmodel_scene_flexcancel
58 Commits over 31 Days - 0.08cph!
Simplify SwapCamera. Removed an orbit camera lock position. Reordered orbit camera lock positions to go to the player first
WIP orbital camera setup. Currently swaps cameras with pressing Q, Tab changes lock target, hold right click and use mouse to move orbit. Needs UI setup
Setup the rest of the player gesture animation buttons. Surrender and the dances don't work right now
Setup more anims:
Viewmodel specific: manualcycle, dryfire, throw, use_self, use_other, use_other_wounded
PlayModel specific: drop_item, pickup_item, drink, victory, wave
Only allow camera movement when the input field is not in focus
TODO comments for later around camera work
Move camera gradually using WASD/leftshift (up)/leftctrl (down)
Clothing is now equipped to the active viewmodel. Makes use of a new editor-only method to apply clothing directly from a list of ItemModWearable rather than using a BasePlayer to look at their equipped clothing. Run this method when equipping items and wearables so the viewmodel is always up to date. (Doesn't work with skins just yet)
Added new FOV slider to the canvas to modify Camera FOV. Setup min/max values respecting regular gameplay FOV bounds. Includes "Field of View" text overlaying the slider
Renamed script in line with scene rename
Setup the existing positonal marker square images in the centre of the canvas so they can be toggled on/off with a new button. Shortcutted with `U`.
Some code cleanup & commenting
Added the scene to SceneLoader so it appears in Editor scenes dropdown menu. Renamed scene to CharacterAnimationAndSkinViewer
Copied legacy script's Camera setup so ironsights ADS, screen shake and animation camera rotations work as expected
Fixed not being able to reselect most recently selected items/wearable after using the clear buttons
Added a clear selected item button (shortcutted with `I`) to unequip the player item, worldmodel and viewmodel
Setup Animations button in the bottom left to open a collapsable scroll view. Works harmoniously with the Items and Wearables select collapsable scroll view - animations button forces collapse of select scroll view, items/wearables button forces collapse of animations scroll view.
Ensure the selected item viewmodel always has the same player skin as the spawned PlayerModel
Fixed editor PlaySoundFirstPerson NRE when there isn't a local player. Added a Sound Manager to this scene so sounds work
Simplified how the scroll view is populated
Code cleanup and reordering
Fixed wearables being removed when selecting a new item
Code setup for new collapsable Items and Wearables selection. Each one is a toggle button that opens a scrollview and populates with items or wearables - replaces the old 2 separate scroll views, creating more screen space. Made the UI bigger. Removed old scrollviews and setup code
Setup new UI layout for tabbed collapsable item and wearable search. Code setup next
Update spawned viewmodel with same skin colour as preview model
Spawn a player model instead of a BasePlayer
Spawn the associated entity via ItemModEntity and equip it via WorkshopPlayerPreview
Turn the spawned player model 180 degrees
Add an Image component to the button used in this scene and populate it with the item icon
Codegen so that the static fields in this scene are handled by domain reload
Prevent keyboard shortcuts for randomising player seed and clearing wearables being triggered when typing in filter input boxes. Ignore shortcuts when filter input boxes are in focus
Randomising the player seed preserves selected clothing
Player can now be equipped with clothing using the wearableScrollView. Multiple items of clothing can be equipped as long as they are compatible in regular gameplay. Equipping a clothing item that is not compatible with others selected will clear the selected clothing. New button to clear player clothing, shortcut with pressing O
Subtract
127494 - contained unwanted files
Increase UI size so the scene feels better maximised
Now spawning a BasePlayer in the scene rather than just a PlayerModel so we can give items to the player later. Rotation is broken right now
Load all wearables into the UI and setup wearable filtering - mirroring the item setup. Can likely clean this up later.
Setup "Randomise Player Seed" button. Some code cleanup/preparations
Duplicated item's scroll view and filter input to create a scroll view and filter box for wearables
Spawn the PlayerModel on Awake. Rotate 180 degrees to face the camera. Force censorship cubes off and randomise the player seed. Randomise player seed again by pressing P
Cleaned up needsCursor, capslock input, item giving, InitPlayer and capslock scene help text
Don't give the player the selected item (we don't want multiple viewmodels)
Don't override the vm position and allow vm camera renderering, instead allow us to override where the vm camera renders from (for these purposes adjusting it 50m down is fine)
Merge from main (had to stomp BaseViewModel changes)
Now spawning the viewmodel in the world at the correct position by disabling VM camera and adding new editor-only position override bool
Add help text "Press Capslock to use UI" and change default text on FilterInput to "Filter items..."
Equip the item on the player when a button is pressed