Welded Blocks
-
I need help to make blocks that stick together until force is applied to it. Can someone help me?
-
I need help to make blocks that stick together until force is applied to it. Can someone help me?
@s9205307-810c679a
I assume you are using the 2D physics engine. You can use the “fix relative position to [OBJECT]” block to make one object remain the same relative position to another object. You need to make sure they are positioned next to each other before running that block.
To break them apart, you can use the “remove relative positon constraint” block.
Here is a demo. The 2 boxes are welded together initially, but when you click the green box, it will remove the constraint.
https://play.creaticode.com/projects/6702f17a72890f104819adea
-
@s9205307-810c679a
I assume you are using the 2D physics engine. You can use the “fix relative position to [OBJECT]” block to make one object remain the same relative position to another object. You need to make sure they are positioned next to each other before running that block.
To break them apart, you can use the “remove relative positon constraint” block.
Here is a demo. The 2 boxes are welded together initially, but when you click the green box, it will remove the constraint.
https://play.creaticode.com/projects/6702f17a72890f104819adea
@info-creaticode Thanks for the example! Do you have any way to do this for clones of one sprite?
-
@info-creaticode Thanks for the example! Do you have any way to do this for clones of one sprite?
@s9205307-810c679a
If you are using the 2D physics engine, then each sprite corresponds to one physics object.
You will have to create clones of both boxes, and bind them together when they are created in your code.
-
@info-creaticode Thanks for the example! Do you have any way to do this for clones of one sprite?
@s9205307-810c679a I’m not too familiar with 2d stuff since I use CreatiCode for it’s 3d blocks more, but wouldn’t you be able to use the When I start as a clone hat block, and then do the welding from there? Maybe try that
-
@s9205307-810c679a
If you are using the 2D physics engine, then each sprite corresponds to one physics object.
You will have to create clones of both boxes, and bind them together when they are created in your code.
@info-creaticode
yeah but how would I show this using clones? -
@info-creaticode
yeah but how would I show this using clones?@s9205307-810c679a CreatiCode added clone reference after a request in 2d physics I made, to reference clones it’s “spritenname|cloneid”, which can just be one join block
Join(sprite|)(clone id) -
@s9205307-810c679a CreatiCode added clone reference after a request in 2d physics I made, to reference clones it’s “spritenname|cloneid”, which can just be one join block
Join(sprite|)(clone id)@tyller_ can you show the example?
-
@tyller_ can you show the example?
@s9205307-810c679a
We will provide an example.
-
@tyller_ can you show the example?
@s9205307-810c679a
The example project above has been updated to create 2 clones of each box, and set up the fixed relative position constraint between them.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login