We have a TP player model that has a rifle attached to the socket on the back and it’s detached when equiping. I haven’t found any tutorials on this exact topic. Can anyone please point me towards the most “righteous” way of physics simulation for any stuff attached to character (grenades, weapons, etc.)?
That’s a bit not what we need: it’s the tutorial how to bring bounciness to the certain body parts And what we need is a physics simulation for another actor that is attached to our actor - a gun and a player’s model
I don’t think it’s just a “bounciness”, it’s a sort-of physics simulation according to the movement animation. There you can not only set an offset values (like in the tutorial), but also a rotation angles.
You can set a socket being bouncy and attach a weapon mesh to that socket. The attached mesh has to have a physical representation (for skeleton meshes - physics asset). But I’m not sure whether the weapon’s mesh will collide with the character’s mesh. So you’ll have to figure out the corresponding values to prevent meshes from penetration.
Another way is to properly set up Physics Asset. You’ll have to add a bone at the position where a weapon is attached. Further you can make this bone produce physics simulation. Follow me =)
Suppose you’ve added a bone. Open PhatEditor. Find the bone in the list, add a box/sphyl body. Make the physical body big enough to include your weapon’s mesh. Having the body selected set it’s Physics Type to Simulate. You’ll probably have to play with constraint settings.
In this video, I have explained how to attach a weapon to the back of the character and simulate the hanging physics for the weapon.
Tutorial :weapon socket physics