Hey y’all. I’m working on a small prototype to get my head around the engine and I was pleasantly surprise to know that it has built-in IK functionality, something that you have to pay for in Unity. I’ve been trying to implement a feature similar to this one:
You’ll notice that, instead of using multiple cameras to avoid the weapon mesh from going through the walls, the dev team of Escape From Tarkov decided to turn this into a gameplay feature and have the muzzle go up by using IK on the player hand/elbow.
The way I implemented this was, when there is a collision, I play an animation that basically makes the player go high ready, and prevent the shoot() method from ever working. However, I would love to be able to use IK, since that would be much smoother than be just playing the animation every single frame that I detect a collision, then playing the “back to aiming” animation. It feels laggish.
My question is around the rotation of the bone itself. When there is a collision, can I just go directly to the bone of the player and apply a 70 degree rotation, for example? How does the IK “activate”?