S
S
sample9112022-02-08 22:21:37
Unity
sample911, 2022-02-08 22:21:37

How to attach a Unity 2d collider to a moving object?

I ran into the following problem: as the game progresses, an ax hangs from the ceiling and swings like a pendulum, I cut the ax, I did the animation, but I can’t make the collider follow the ax blade, it just stands still. I searched through a lot of information, but I did not find the answer. Perhaps someone will tell you how to do this or indicate the material where it is implemented.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mimocodil, 2022-02-09
@Ezekiel4

Hang the collider on the blade itself or make an empty child object with a collider of the right size. When the parent object (axe) moves, it will automatically pull up all children.

S
sempl911, 2022-02-09
@sempl911

Unfortunately this does not work for either a blade or an empty object. I have a skeletal animation of two bones 1 is the base, 2nd is the blade itself. So the 2d collider polygon was clinging when the game starts, the collider remains static, and the animation goes on as if nothing had happened ... I don’t understand ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question