“Dont mind me, Doris. Just testing out some builds for the new ramp quest.”
Choosing Which Piece to Pick Up #
I’ve implemented a targeting system and got it working with fastening targets.
So when several targets are available, the controller stick can be used to choose between them. So far so good.
Now I’ve got to apply it to picking up build pieces.
So right now, the piece that’s nearest to Manle#y’s feet is automatically highlighted and will be picked up. The only way to select pieces is to move Manley around but he’s got a limited area he can move so some pieces—like that large plank at the top—are unreachable.
Build pieces are trickier than targets for a few reasons.
Planks are not points so navigating between them is not so obvious.
I can’t just use the position of the plank (the center) as the starting point for where to select next. I could try it but I’m pretty sure that would feel super unnatural.
Also, with multiple planks nailed together I could end up with any number of shapes. Like what if a box of planks surrounds a piece in the middle that I want to select? Which direction should the controller go to select that? That is a very real use case and I dunno what should happen there.
Should I have a target that the player moves around? Then just select whatever is under it. Should the target be visible?
I’ll try that first.
- Press and hold to highlight pick up object. Release to pick up.
- Write a new targeting system. CarryableTargetingSystem. Use a simple target switching behaviour to begin with and integrate it.
- Update the target switching behaviour until it feels good.
- Extricate carrying from the ActionSystem.
Easy..?
Hmm, getting ahead of myself here but maybe ray cast from the current target position in the direction of the controller stick event. (Ignore currently-selected object.)