The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

func mouvement_bras():

get_node("collision_main").position = Vector2(main.position)
in Engine by (17 points)

What's your question here? What are you trying to do? What are the node types of bras, collision_main and mainrespectively?

All right so i, i create a rig

bras = Arm Bone
collision_main = collision2d of a the hand
main = hand polygone

I want to move my hand collision with my hand polygone.

How does your scene tree look like? If the CollisionShape2D is a child-node of the Polygon2D, then moving the latter should also move the former - no code required!

Yes, but Collision2d can't be child of 2d polygone

1 Answer

0 votes

You can add a RemoteTransform2D-node as a child of the Polygon2D and set the CollisionShape2D that you want to move as its "Remote Path" in the editor. This way the CollisionShape2D can remain a child of the Player's KinematicBody2D, but will be moved and rotated along with the hand polygon.

by (10,634 points)

enter image description here

It work in the editor but not In the game.

How have you determined that it doesn't work? In the only in-game-screenshot you've provided, one cannot even see the CollisionShapes. Make sure to toggle Debug > Visible Collision Shapes before running the game! Are they in the right place? Do they move with the hand? Which parts are working and which are not?

Everything is working but the collision is not moving as you ca see in the gameplay screenshot where i'm supoosed to fall but my collision support me.

Look: If I could see that from the screenshot I wouldn't have asked. In general: it's not possible to see if something is falling or not by looking at just one screenshot...

This is a waste of my time, sorry. I told you what I know.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.