#3 - Combat problem fixed!
Hi :)
I fixed the problem I was having which is nice. It was partly just that I took some time away before trying again, but I also tried to be patient and take a more systematic approach. This meant splitting the problem up into a (hopefully) exhaustive list of actionable venues to go down, so then you can repeatedly rule out potential problems until you're left with the solution. This seems obvious, but it should be distinguished from my approach during my internship. There I wasn't aware of all of the variables, so I couldn't systematically isolate the problem, so I just had to shoot in the dark until I stumbled across the answer. There was probably a better way of doing that. Anyway here's my notes for this problem if that's at all useful:
// so the problem is that this triggers when it hits the wall, and im assuming it bounces the player away, but then they collide with the wall again for some reason
// so is it actually bouncing the player away?
// its strange, it oscillates within a range of 0.8
// the first frame, transform.position moves to the new position, but the second frame it doesnt, instead it reverts to its original position
// is it that its calling CheckCollisions, then UpdatePosition, which is moving it in the wrong direction and colliding again?
// yes!! and that actually makes sense why: if its bouncing against a wall, that probably means its path continued past that wall but im telling it to stop. and since i only give it a direction when its meant to change, when i tell it to go back a bit, it doesnt know that it should change, and tries to follow the path it was going again and hits the wall
// so i guess i have to tell it to change direction? theres a global variable for direction, so change that
// and i figured out why it was working before when i had CheckCollisions and UpdatePosition together: i was initialising a new direction variable in CheckCollisions where i wasnt before!!
// it worked yahoo!!!
Anyway I'm not entirely sure what my next step for the combat is. I guess the only next step is designing and coding enemies, but for some reason I feel more lost regarding what to do than that would make it seem. And this has been the case with other aspects of the game as well. I think it might just be that I know there's so many things beyond that which need to be done and I freeze. That's fine.
Grapple Game
More posts
- #6 - Types of CreativityJan 19, 2024
- #5 - Motivation 2Jan 09, 2024
- #4 - Analysis of API assumption problemDec 18, 2023
- #2 - Motivation and issue-issue workDec 10, 2023
- #1 - Level Design, Combat, and Art AssetsDec 10, 2023
Leave a comment
Log in with itch.io to leave a comment.