- Home /
2D physics animation. How do I animate a character with physics
I'm considering to make a 2D shooter with animation somewhat adaptable to physics (not to an extreme) as in the character is loosely animated with physics: like if I were to run at a wall my hands wouldn't clip through for instance. Then I want to be able to control one arm with my joystick to point my gun and the hand transitions from running animation to pointing "animation".
Is there a way to do this... animation-wise? I don't know about any other way of animating in 2D other than in frames.
Answer by theANMATOR2b · Mar 24, 2018 at 06:27 PM
If you are limiting yourself to animation (rather than code or systems) you will have to create conditions to play different animations when those conditions are met. ie when arm hits wall play arm bend animation.
Alternately - aiming can be controlled via IK or raycasting to point at the cursor location.
Keeping the extended arm/weapons from penetrating walls is usually controlled by a combination of IK and trigger/colliders.
Researching those key terms should help you progress towards solutions for your 2D character setup.
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
SpriteManager 2 1 Answer
Sprite animations won't export/run in a published build unless you play in editor first 1 Answer
Animation transform lock 0 Answers
how to get a constant velocity 2D? 1 Answer