- Home /
Manipulating an animation towards a target object (ie. The hand and arm lean towards the target)
Hi there,
I am trying to make a boxing game just for fun (I dont expect the end product to be anything decent lol) . I have my boxers in the ring and they are animated quite well so far, with Idle, and punch Left and Right. They also rotate so they are always looking at each other.
What I want to do is give the punch some aim towards the head. I will give the punch a set amount which it can move from the standard animation and move the hand bone in the direction of the targets head object. But I don't know how to do this :S
So far i have used dragged the 3 animation files into Mecanim and coded it to do the animations when a button is pressed.
Is there a way to manipulate the animation in this way? (ie. actually make the arm reach towards the target object )
In follow up to the comment by Dinosaurs... Perhaps there is some element of IK included in the standard MakeHuman game skeleton I am using (as pictured):
Answer by Dinosaurs · Dec 19, 2017 at 06:22 PM
The thing you're looking for is inverse kinematics! It's a pretty complex topic that can't really easily be explained quickly, I highly recommend running through Alan Zucconi's IK and procedural animation tutorials to get a handle on how to do this: https://www.alanzucconi.com/2017/04/17/procedural-animations/
Hi there, thanks for this. I have made some I$$anonymous$$ stuff before following some tutorials on youtube Blender. But I'm not sure, maybe its already been made for me, I forgot to mention that my boxer is a model imported from $$anonymous$$akeHuman. And it has the game.json skeleton. When I click 'Play' in Unity, if i then look at the scene in the editor I can see little spheres near the elbows and knees and other places, is there a way to access those if they do exist? ...hoping you can help me again @Dinosaurs
@Dinosaurs I added a screenshot to the question to show what I mean
I'm not familiar with $$anonymous$$akeHuman, sorry!
Your answer
Follow this Question
Related Questions
Issue with mecanim playing an animation using setbool 1 Answer
How to get back to the first position animatedly in unity? 1 Answer
Unity 5 - Starting Mecanim Animation At Specific Time 0 Answers
NPC entering and exiting a car with animations 1 Answer
Mecanim Example Scenes import warnings. 0 Answers