Interactable and Door collision

 Author: Cameron Taylor

I wanted to get interactables working so I made a child off of Entity and gave them special attributes that I could use to figure out what each interactable did. I then used health from entity as how much health is used to heal the player. A problem I ran into was update was called too fast! This is weird because usually the code works, but since update is called about 900 times a second then interacting with interactables started breaking. A prime example was with the starting doors. When pressing 'E' to start there was a chance that it would start twice and fill buffers twice and this took a painful amount of time to track down.

To solve this I had to put breakpoints everywhere and see why the function was being called twice. Took more time than I would like to admit, but the final solution was putting a boolean check inside start to make sure the start code only happens once. Before this it was starting 2 sometimes 3 times. 

Comments

Popular posts from this blog

Adding assets to every enemy -- Owen Meyers

Sphere to AABB collision