Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
799 stars 90 forks source link

Infinite physics carry. #61

Closed OtsoT closed 6 months ago

OtsoT commented 6 months ago

When holding physics item (like the box in the demo) you can trap it behind a wall and walk away while technically still carrying it. This should have some sort of forced drop at some distance.

Phazorknight commented 6 months ago

Makes total sense and shouldn't be too hard to implement. Will try to get that added soon.

Phazorknight commented 6 months ago

Added the following in 202402.04: CarryableComponent now has a drop_distance property. If the distance between object and the carryable position goes above this value, the object gets dropped. It's not perfect but helps with "sticky objects".

As a fun side-effect, if the carrying_velocity_multiplier can't keep up with how much the player moves around with the mouse, the drop_distance is easily reached, thus making it feel like you can actually physically throw objects.

Tweaking these properties is definitely recommended to achieve desired behaviour.