P
P
PurgaBot2021-10-18 10:15:42
Unity
PurgaBot, 2021-10-18 10:15:42

How do I move an object with an object that is animating?

Help, comrades! I have a moving object through animation, I need the object that hit this object to move with it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleBob, 2021-10-18
@LittleBob

You can use the OnCollisionEnter2D method, and in it - you can add an object to the parent relationship with the object that is moving. This is done via SetParent or "object name".gameObject.parent = "moving object name"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question