Skip to main content
1 of 5

methods for player interaction with world

What's the proper way, a proper way, or any proper way at all, to handle interactions between a sprite (usually a player) and another sprite (can be any other object)? (in a tile based world)

i.e. getting into a vehicle, talking with other character, reading signs, etc.

My first instinct is to have some kind of "feeler" or interaction rectangle that's always in front of the player in the direction the player is facing. Then if that rectangle overlaps some kind of intractable object (driver door on vehicle, other character, sign, etc) I would be able to initiate an interaction.

Is this a naive implementation?

Thanks!