- Home /
Need help with tool animations!!
Ok, so i am making a 2D game
And I'm not sure how to handle the tools' animations and movement. I don't know whether to use code or animation.
I need the tools to move along with the player and turn according to the player's rotation. But, if i use code for the movement and turning of the tool, I can't use animations anymore. I also don't think there is a way using animations to move the tool with the player...
Does anyone know how to handle both the movement and animations at once?
Also, if the wording is a bit hard to understand, I can re-word the question
Answer by Barkine94 · Feb 08 at 11:11 AM
You can just make the transform of the tool the child of the desired transform it will move accordingly.
I tried this before and it didn't work because the camera was also a child of the player.
I retried now without the camera being a child and it works. Thanks a lot @Barkine94
Just a little tip. Childing camera to other gameobjects might introduce problems later. Try to use cinemachine or just code a simple follower script for camera for these types of games. Have a good day.
Thanks for the tip!! I just made a camera follow script and everything works perfectly...