KinematicBody and Joints

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Radinyn

Hello, in that post I found the information that KinematicBody2D movement doesn’t work with Joint2D, is it still the case?

https://forum.godotengine.org/51202/how-to-restrict-the-movement-of-kinematicbody2d-to-a-circle

Also another thing, is it possible to make an empty circle collision shape?

Radinyn | 2020-04-27 09:30

:bust_in_silhouette: Reply From: njamster

KinematicBody2D movement doesn’t work with Joint2D, is it still the case?

Yes, that’s still the case. And there’s no reason why that should change. It’s not like it’s a bug! The whole point of KinematicBody2D is that they aren’t affected by physics.

Is it possible to make an empty circle collision shape?

No. However, you can use a CollisionPolygon2D, set it’s “Built Mode”-property to “Segments” and set enough vertices that it looks like a circle.

Thanks for answering, really appreciate it. Basically I wanted to make swing ropes using those Joints however I decided to code my own system that creates an CollisionShape2D below the KinematicBody (player) that rotates accordingly to the angle between the player and the point on which the rope is hooked. After some tweaking it works really well, hopefully that approach will be useful to someone who reads it in the future.

Radinyn | 2020-04-27 14:59