ModestyG / basicRPG

0 stars 0 forks source link

Setters and getters used for collision detection #1

Open ModestyG opened 3 months ago

ModestyG commented 3 months ago

The setters and getters placed on the positions of game objects with colliders are not best practice and make their attached attributes unwieldy when trying to implement logic pertaining to the collision in question. They also introduce potential bugs should someone unfamiliar with the code try to change one of these values without triggering a collision check or trigger a collision check without movement.

ModestyG commented 2 months ago

One way of solving this could be attaching the function call to the transform function instead or giving up and making every collider check every frame