How to move a Rigidbody2D along another Rigidbody2D
I have two Rigidbody2D objects, the triangle and the platform ,as in the gif
why isn't the triangle moving with the movement of the platform and how can I do that?
http://gph.is/2xwoF8l I will repost it, meanwhile here's a link
i saw the gif; that's just the way it works;
the below platform wont do any thing like that to the triangle;
to do it u can just child the traingle object to the platform GameObject ;
transform.SetParent(PlatformTransform, false);
Answer by Cuttlas-U · Sep 27, 2017 at 02:35 PM
yeah there is ; u can use joints ; like fixed joints; there is a good tutorial here :
the idea never occurred to me, I will be sure to check it out. but can you explain to me how it's supposed to work? so an object lands on the platform and a "fixed joint" is formed at the point of contact, which would allow it to move along with the platform?
yeah it will allow it to move along with the platform ( if u use a Fixed joint)
but i did not know it has to fall down on the platform;
because joints wont let that happen ;
so u can let it fall into the platfrom then with a collision detection detect the impact and at the same time add a fixed joint the traingle so it move with the platform from that time ;
but i think make it the child would be better :)
Your answer
Follow this Question
Related Questions
Rigidbody rotate velocity 0 Answers
Adding force to a rigidbody opposite to the direction of a rotating weapon 0 Answers
RigidBody becomes awake without a collision 1 Answer
Collision sticking? 1 Answer