[Enhancement] Variables for seat occupied and rider yaw and pitch
gyrohero opened this issue ยท 5 comments
In the past, we've discussed ways for a camera to track a player's sight without needing to have a gun. My proposed solution: have variables player_yaw_# and player_pitch_#. This would allow the variables to be used for other things like spotlights as well. The # would refer to the seat number in which to find the player. If the camera/light/etc. is to be controllable from multiple seats, have multiple animations, one for each seat.
Now, how do we handle possibly having players in multiple seats? Allowing the animations system to use && and ||, plus their NOT variants. These could be nested for more complex logic.
"and": { "variable": "customVariable1", "nand": {"variable": "customVariable2"} }
At least initially, these could just accept boolean variables. That would allow having a switch to change control between 2 pilots. Or, with an added "player_in_seat_#" variable, you can do something like
"nand": {"variable": "player_in_seat_1"}
to assign priority over which seat gets control. In this case, seat 2 would only get control if seat 1 was not occupied by a player.
So to sum up, this is really 3 suggestions:
- player_yaw and player_pitch variables
- and/or/nand/nor
- player_in_seat variable
And each of these, individually, don't seem like they should be too hard to pull off. So I can knock these out as long as you think it's feasible/a good idea.
Let me think a bit about this one. The implementation of variables themselves is easy, but I need to think about how they'll work with the other systems and how the rendering pipeline will behave.
So, I'm still mulling on the booleans, but here's what I think should be done with the players:
Add a new variable called seat_X, where you can have the following:
seat_occupied
seat_rider_yaw
seat_rider_pitch
That would work nicely with the existing hierarchical system, where if you have a seat that's a gun's controller by the gun being a sub-part of the seat, or the gun being an additional part of the seat, then you don't need to worry about numbers. The seat variables will only return values if a player is in that controlling seat. For the inverse, where a seat is on the gun, then you'd have to specify a _1 for the seat number, but that should be easy to handle as you'll already know the seat order. This won't require much anything in the VAS either, as it'll be using an existing system.