Open toxicrecker opened 1 year ago
the issue still exists in rc2
Looking at the first video, it's expected that you should be flung into the air if you flick your screen around all over the place while holding the object. The object is taking the shortest path to the target location, so if you turn too quickly the shortest path will be through your character controller. This is a common problem regardless of the game engine. I believe the usual solution is to temporarily disable collision between the character controller and the held object, and then reenable it again when the object is dropped.
The glitch at 0:16 in the first video is strange, though. That could definitely be a physics engine bug.
As for the second video, it's very common for physics objects to jitter and bounce when you try to force them into another object, again regardless of game engine. The only question is whether it's jittering a reasonable amount.
About the glitch, it definitely is a physics bug and about the jitter when I try to force it into ground, that is not an issue in Godot 3, that is not an issue for the first few seconds in Godot 4 either. For the first few seconds, everything works as expected but then gradually everything gets bugged out.
About being flung into air, I fixed that by adding the player as an exception to box's collisions.
I think it'd be reasonable to add a bug label to this issue because I think this is something that should be fixed on priority. Pickable objects are not a rare thing to see in video games and if something like this can happen in this thing, it can happen with other physics related objects as well. But I don't know much about how Godot works so I'll leave that up to the maintainers to decide.
I believe the usual solution is to temporarily disable collision between the character controller and the held object, and then reenable it again when the object is dropped.
To make this work more reliably, you can even disable collision for the dragged object entirely, and use a simple RayCast (or ShapeCast) to position it in the game world while the player is dragging it. Once the player is done dragging the object, reenable collision for it.
Godot version
4.0.rc1
System information
Windows 10, Forward+, GTX 1650 SUPER
Issue description
The physics are jittery and I experience random teleportations on this object picking system I created from a tutorial
https://user-images.githubusercontent.com/62395124/218495485-b653b9d7-f6b3-45a6-90b8-65fe27aa28d9.mp4
https://user-images.githubusercontent.com/62395124/218495491-e3a46ebc-b2f6-4614-8f9c-f009bc758e01.mp4
Here is the script:
Steps to reproduce
N/A
Minimal reproduction project
https://drive.google.com/file/d/1VmlvV8PlkvpRIBFsC1qRw-yzETUzKbwO/view?usp=share_link