Closed GTink911 closed 3 years ago
Always wanted those seats to 'work'!
The character animation (pose) used when piloting may well be re-usable in the passenger seats - the seats themselves are very similar, so it might work.
If ZG used Unity's regular Mecanim finite state machine for the character animation, I'd imagine there's a state in there for the seated pose that's used when piloting, and some logic that triggers the transition between that and standing - likely a raycast to the seat's collider, player presses F (interaction key), and possibly setting a (bool?) parameter on the character's animator component to trigger the transition, while also being 'locked' in place until exiting the seat.
To make this work I think you'd need to get that to transition when the request to sit in the passenger seat comes in, with similar behaviour as the pilot seat. I expect the passenger seats lack some of the necessary components currently to allow for this, so some work would probably be required in that area. Perhaps using pilot seats as passenger seats (and disabling their piloting ability) would be the quickest route to achieve it, unless there are complications in this approach.
I don't know if it's still the case, but previously only the character piloting saw themselves sitting - other players would see the pilot standing in front of the seat while piloting. This seemed to be a lack of sync of the animator state between the various clients in this case, and may well have been intentional, or maybe just an accidental omission, however reducing the sitting animation to a single keyframe would make the animation data significantly smaller.
If this suggestion is considered, it might be nice to get the pilot seat and the passenger seats working so that all players see a sitting player correctly. :)
I recall in V1 of the game there were extremely long (and blocking) animations for getting in to and out of the pilot seat that included some animated 'control handles' that popped out of the arms of the seat once the arm tops had retracted. The seat and pilot animations were dropped, and the pilot now teleports from standing to the seat instantly.
The cryopod entry/exit animations weren't changed when the pilot seat anims were, and retained their long and blocking status, but I think they are mostly acceptable (but shortening them would be good IMO).
Perhaps the current (long) cryopod exit animation could be used for the first time a player exits (after long term cryosleep) but otherwise uses something a bit shorter. Perhaps simply adjusting the transition times in the animator FSM might be doable via a script.
This has been addressed as a bug, because it's what this is.
The issue 303 is where the solution is presented, if you curious.
https://github.com/zorkind/Hellion-Rescue-Project/issues/303
Is your feature request related to a problem? Please describe. No.
Describe the solution you'd like Allow players to sit in the Steropes' chairs. Also, make it so when you pilot you actually sit in the seat.
Describe alternatives you've considered None.
Additional context None.