Open OvercastInteractive opened 5 days ago
FYI, while this works it is still just a quick fix and is not the best implementation.
Thanks for flagging this. Have some idea on how to fix/improve this properly. Will take a look.
Okay, so I just pushed a commit that should improve this, but I realized I was still on the PR for the plugin-rework.
Anyway, you can find it here: https://github.com/Phazorknight/Cogito/pull/332/commits/9b8784624d56bddc1c5acc0fd996eec7d094176d
Cogito and Godot Engine Version: Godot 4.3 Cogito beta 202411.01
Description: When carrying a mug and approaching a raycastable surface the carriable is automatically dropped
Reproduction steps: In the breakroom, carry a mug and then aim and move toward a wall
The
CarryableComponent
leave() function is called, but the actual issue lies in thePlayerInteractionComponent
setting a carry destination point that exceeds the carriable's drop distance. For example, carry the flashlight toward a wall and when close enough it will move away from the player and rest against the raycasted surface instead of remaining at its carry_distance_offset.In
PlayerInteractionComponent
get_interaction_raycast_tip() the destination_point calculation isn't respecting theCarryableComponent
carry_distance_offset and moves the carriable toward the raycasted surface and in doing so it moves it beyond the drop distance for the mug, making it appear as being automatically thrown/dropped.Expected Behavior: Carried object's destination point should be preferred over the interaction raycast's collision point when it is the closer distance away
This produces the expected behavior: