Induction Terminal: Raycast Refit
What Do?
I continued working on my induction terminal today. I started by making massive changes to the code. I removed a lot of the functionality I built into my interactable base object and updated some other things. I really thought it was going to be pretty easy. I was wrong. Immediately, I was faced with a crash while testing. Seems I hard coded my player character to look for certain variables on interactables and I had removed them.
In this specific situation, those variables are meaningless, but I put them back because they have to exist. After that, I made some more changes and did some more testing and was running into inconsistencies. The first thing that occurred was my interaction indicators not showing/hiding appropriately. I looked through the scripts and couldn't for the life of me figure out what was going on.
Gemini Tries
So, I took my scripts (the player character, the original interactable base, and the new induction terminal) and fed them into Gemini with a description of the problem. The first thing it did was come back with an invalid assumption, which I had to correct. Then it came back with another invalid assumption, which I again had to correct. At this point though, I also noticed another odd behavior, my raycast wasn't actually targeting the center of my interactables.
For some reason it was targeting ~40 pixels below where I expected. I decided to then focus on that issue, and tried to get Gemini to help figure out the cause. Gemini's first proposed solution didn't work, it actually made the issue worse by shortening my raycast. It's next suggestions was that I was blind and didn't realize my nodes were off-center or something. Another obviously bad response from the AI.
Finally, it started giving me better ideas. The first was to change the way the raycast originates, but that moved the starting location, which caused other issues. Finally, Gemini presented me what was really going to work, correctly specifying the raycast's origin programmatically. Somehow when this was originally built out be Gemini, it wasn't setup to calculate the target position correctly. The fix was a simple change to a single row of code.
Better yet, that actually fixed my issue with the interaction indicators too. I'm not sure how exactly, but the raycast targeting issue was the source of that problem. Now, my interactions will all work better because of this one little fix. This isn't exactly what I expected to get done today, but it's still a step closer to my goal, and it is always a great day to solve a problem you didn't even realize you had.
What's Next
I've still got a lot of work to do on the induction terminal. Right now the interaction does nothing more than play a sound. I need to make it open my induction terminal scene. I then need to build out all the functionality for that scene. I think I may even add a new cutscene! Something simple, maybe just a single frame. But I've got the ability to play cutscenes so I should probably use them.
Xenodochium
The future is what you make of it!
Status | In development |
Author | Munchmo |
Genre | Role Playing |
Tags | 2D, Cozy, Godot, Indie, Life Simulation, Pixel Art, Sci-fi, Singleplayer |
Languages | English |
More posts
- Saving: World Object States6 hours ago
- Quests: Objectives and Triggers1 day ago
- Getter Functions: A New Approach2 days ago
- Lazy Dev: Day Off?4 days ago
- Dialogue System: Quests5 days ago
- Displaying: Quest Objectives6 days ago
- Induction Terminal: What's in a Name?8 days ago
- Now Hiring?9 days ago
- Documentation: Is Everything10 days ago
Leave a comment
Log in with itch.io to leave a comment.