Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
928 stars 105 forks source link

Demo hint collision behavior is non-immersive #242

Closed OvercastInteractive closed 3 months ago

OvercastInteractive commented 3 months ago

Cogito and Godot Engine Version: Cogito: beta 202407.01 Godot: 4.2.2

Description: Cogito Demo Hints are static collision objects, which can collide and act as platforms for holdable objects, similar to furniture.

Reproduction steps:

  1. Go to the starting point of the game
  2. Hold a wastebin or planter pot
  3. Move it into or on top of the Cogito Demo Hint

Expected behavior: Cogito Demo Hints are non-colliding objects.

Screenshots: Cogito_Demo_Hint_Collision

Suggestions: I was easily able to get around this by changing the cogito_demo_hint root type from StaticBody3D to Area3D, and then in cogito_player checking the "InteractionRaycast" RayCast3D child of Camera to "Collide with Areas".

The obvious concern is any new issues that arise from interaction raycasts detecting areas.

Phazorknight commented 3 months ago

Hey, so there's an easier solution to this: Just disable the first collision layer on the Demo Hints.

image

This way, the Interaction Raycast still picks them up as expected, but objects like the planter or the cups don't collide with them. Also avoids any potential issues with Area3Ds.

Will consider updating this in the next commit as well.

OvercastInteractive commented 3 months ago

Even better, great! 😁

Phazorknight commented 3 months ago

I've updated this in https://github.com/Phazorknight/Cogito/commit/ed83c1327773f7d13c6a804b4b0bfe124350f719, considering this issue resolved.