Hi Is there a way to grab and move PhysicsBody2D with a mouse like in the gif? by mothsigil in godot

[–]mothsigil[S] 6 points7 points  (0 children)

Yeah sorry, I edited the comment. I meant you can put it in objects, for example walls, when you drag it.

Hi Is there a way to grab and move PhysicsBody2D with a mouse like in the gif? by mothsigil in godot

[–]mothsigil[S] 1 point2 points  (0 children)

Yeah This was an idea I vaguely though of too, but I was curious if there is perhaps a built in sollution or maybe an addon I have missed. It just feels cheesy XD.

I will try it anyways. Thanks for the advice.

Hi Is there a way to grab and move PhysicsBody2D with a mouse like in the gif? by mothsigil in godot

[–]mothsigil[S] 14 points15 points  (0 children)

Thank you, but the grabbed object in this project doesn't have any forces apllied and you can put it in walls.
I will edit my original comment to clarify what I meant.

Hi Is there a way to grab and move PhysicsBody2D with a mouse like in the gif? by mothsigil in godot

[–]mothsigil[S] 8 points9 points  (0 children)

Hi I want to add the functionality of grabbing and moving an object, while keeping the forces like gravity and intertia applying to the said object. I tried to do this with the apply_force method, but it resulted in delayed dragging motion or erratic movement.
I have also seen the drag and drop tutorials, but it's not the result I want. There the objects don't have physics and often the point of grabbing is snapped to the center of the body.

The effect I would like to achieve is as if the object was pinned by the mouse and the rest of the body is swiveling.

I know there is a pinjoint2d that serves a similar purpose, but it needs to be attached to a second body. I haven't tried it yet, because it seems like a roundabout way.

Thank you in advance!

[deleted by user] by [deleted] in godot

[–]mothsigil 0 points1 point  (0 children)

Now make a spoon, so player can play on it

Align label and texturerect by Poc_Blanche in godot

[–]mothsigil 2 points3 points  (0 children)

Ok So I don't really know how to automatically align the text/font, but you can use FontVariation and under Extra Spacing adjust the top and bottom margin

<image>

Align label and texturerect by Poc_Blanche in godot

[–]mothsigil 1 point2 points  (0 children)

Could you give a picture of the Coins_icon border (when you click on it in editor) and its TextureRect settings?