- Home /
Applying force to another object by hitting it with an animated object: Possible?
Say I have a big hammer object and I have animated a swing that is meant to launch a rigidbody. Can I have it apply force to an object in that relative direction when the collider on the animation hits? Or perhaps there is a more effective logic to do this.
Answer by uriyeah55 · Mar 14, 2018 at 02:31 AM
I don't believe you can do it, but I'm sure any expert around will share a properly answer. The only solution coming to my not-so-pro mind is to set an event in the end of the hammer animation. Said event could get the position and rotation of the player and apply it to a certain object (assuming you are doing for example a puzzle game). But if the case is something more agile like hack and slash combat or something I'm not sure I can help. Hope I've been of some help!
Cheers
Thanks uriyeah! With this logic I am definitely able to script something along these lines. When I revisit this issue I'll try to get it working and see if I can post a script for others to view and mark this question as answered. For now I think I'll leave the question open for more input.