- Aug 31, 2021
- 97
- 176
Been working on a game for 6 months now and cant personally decide on which door function to use. What do you guys like?
Open a door by looking at it and pressing a button
or
Open a door by being close enough to it and pressing a button.
They both have their benefits and drawbacks.
EDIT:
Guess i need to clarify.
The game is first-person.
You walk up to the door and become close enough to open it.
Now do you have to be looking at the door to open it or can you be facing slightly to the right but still be able to open the door?
In developer terms. Collision-based door interaction or vision hit-based?
EDIT2 BETTER EXAMPLE EDITION:
Currently (bc I was being lazy and needed it out of the way real quick) my doors have a collision box attached and when you enter the collision box, input (pressing e) to be able to open the door becomes active.
My question (which I'm realizing wasn't explained too well bc I'm not good at that kind of stuff.) is should I switch to a line trace (which would shoot out in front of the player and stop before going so far that interaction would be unrealistic.) to detect the door and allow input, or stick with the collision box system? Im using Unreal Engine btw.
I like the collision system bc it allows the player to close doors behind them without having to turn around and open them without directly looking at them which feels realistic.
I like the line trace method bc it allows you to have doors that are close together and not have them both open when you're trying to open one (Example: two doors on either side of a corner, the collision boxes overlap in the middle.).
EDIT 3 CONCLUSION EDITION:
I've decided on a mix of sorts. It's going to be used for all detection and interaction, not just doors.
Simply put, I'm going to detect if said actor is on screen(check if rendered), then check if the distance is at arm's length, then add a preference that always chooses the closes actor (and maybe even the actor that's closest to the center of the screen).
This will avoid the awkwardness of trying to hit small objects with the line trace at the center of the screen.
Also, I think I might add an icon that appears on the actor to signify what actor you'll be interacting with when you press E.
Thank you all for commenting and voting! helped a bunch. I'll see you when the game releases, or if I need input again.
Open a door by looking at it and pressing a button
or
Open a door by being close enough to it and pressing a button.
They both have their benefits and drawbacks.
EDIT:
Guess i need to clarify.
The game is first-person.
You walk up to the door and become close enough to open it.
Now do you have to be looking at the door to open it or can you be facing slightly to the right but still be able to open the door?
In developer terms. Collision-based door interaction or vision hit-based?
EDIT2 BETTER EXAMPLE EDITION:
Currently (bc I was being lazy and needed it out of the way real quick) my doors have a collision box attached and when you enter the collision box, input (pressing e) to be able to open the door becomes active.
My question (which I'm realizing wasn't explained too well bc I'm not good at that kind of stuff.) is should I switch to a line trace (which would shoot out in front of the player and stop before going so far that interaction would be unrealistic.) to detect the door and allow input, or stick with the collision box system? Im using Unreal Engine btw.
I like the collision system bc it allows the player to close doors behind them without having to turn around and open them without directly looking at them which feels realistic.
I like the line trace method bc it allows you to have doors that are close together and not have them both open when you're trying to open one (Example: two doors on either side of a corner, the collision boxes overlap in the middle.).
EDIT 3 CONCLUSION EDITION:
I've decided on a mix of sorts. It's going to be used for all detection and interaction, not just doors.
Simply put, I'm going to detect if said actor is on screen(check if rendered), then check if the distance is at arm's length, then add a preference that always chooses the closes actor (and maybe even the actor that's closest to the center of the screen).
This will avoid the awkwardness of trying to hit small objects with the line trace at the center of the screen.
Also, I think I might add an icon that appears on the actor to signify what actor you'll be interacting with when you press E.
Thank you all for commenting and voting! helped a bunch. I'll see you when the game releases, or if I need input again.
Last edited: