Hi there, I’m still slowly plugging away on this physics-based octopus game in my spare time. I’ve run into an issue with physics attachment and I think I’ve narrowed down where the root of the problem is. To summarize the problem, I have been trying to spawn a physics constraint at the hit location of a skeletal mesh and some other object. This works, but the physics constraint is left with an odd offset that causes some very strange behavior, as highlighted in this video:
In this example, I spawn the physics constraint at the bone's reported location and enabled it, basically locking the bone in place at where it was when the On Hit event fired. As you can see, this bone (which has a small sphere for its physics volume at the end of the tentacle) is no where near the surface.In this image, I’ve further narrowed the problem by spawning some marker spheres on where the On Hit Event is reporting that the bones are:
In the above image, I’m spawning physics constraints when the tentacles touch the green platform below the octopus. You can see that the spheres are no where near the surface where the tentacles are actually touching.
In the next image, I’ve disabled the rotation in the tentacles caused by the physics simulation. This highlights that the location I’m getting (Using Get Socket Location) is actually the location for the bone at the bind pose, not where it currently is in the simulation.
You can see that the markers are all on the surface where the skeleton is touching. This behavior aligns with my suspicion where the location given by Get Socket Location doesn’t give the location for the bone in the simulation, but rather where it is in the bind pose. I’ve tried adding custom sockets to the bones, but the function gives the same results.
Anyone have any idea how I might be able to find the location of a bone in a skeletal mesh that is using its physics simulation to flop around?