Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
670 stars 72 forks source link

InteractionRaycast doesnt appear to be working at all #185

Closed PeterD23 closed 2 months ago

PeterD23 commented 2 months ago

Cogito and Godot Engine Version: 4.2.1.stable.mono

Description: Player is unable to interact with any objects, looks to be an issue with the InteractionRaycast since running the project was throwing a "cannot add null value to add_exception_rid()" on player._ready() This appeared to happen after updating branch from commit 6d9f37e1a7fb0eee6d3a7d3399f5f4e00f9be1c1

Reproduction steps:

  1. Run the project with the latest main commit
  2. Note the add_exception_rid() error
  3. Stop the project, attach the interaction_raycast.gd script to the Player scene InteractionRaycast
  4. Rerun the project, note error no longer appears, but nothing is interactable

Expected behavior: Items should be interactable

Screenshots: image

aronand commented 2 months ago

I'm unable to reproduce this from a clean pull. Can you paste the error you're seeing as well?

I'm only getting the following warnings: image

Regarding step three, the raycast should have the script assigned to it already 🤔 https://github.com/Phazorknight/Cogito/blob/main/COGITO/PrefabScenes/player.tscn#L99

aronand commented 2 months ago

Oh nevermind, saw the error at the top. That's a really weird one though, not sure why get_rid() would be returning null from the player there.

PeterD23 commented 2 months ago

When I pulled over the files I chose "reload" instead of "resave" because I assumed that would have updated the files the newly copied ones but is that correct?

PeterD23 commented 2 months ago

I wiped the whole folder and started again after a failed attempt to do some refactoring and now it seems to work. I'm guessing Godot cached some files which ended up causing issues.