I made a simple code that attaches NPCs to the desired socket on a vehicle skeletal mesh inside it’s Blueprint.The problem is, they don’t seem to really attach. I was executing code and found that Sedan Vehicles (low in height) appeared fine but SUVs were causing problems as the NPCs were sinking. So I picked a sedan Blueprint and lifted it up to realize that the NPCs just simply drop through the Vehicle.
In Vehicle BP, I attach the NPC and then set it’s location & rotation the same as socket. Hence they face the correct side and are placed in correct spots but somehow, they don’t really attach to the vehicle.
[ Note - Collision is toggled off when NPCs sit inside vehicle so it’s not a collision problem. Also, they exit from their respective spots as there’s an Arrow component right beside each door in Vehicle BP that dictates their Location when NPCs exit. ]
I am using “AttachActorToComponent” node by passing the Vehicle’s mesh as Parent and NPC Ref as Target, using SnapToTarget rule.Even tried AttachComponentToComponent but it’s still causing the same issue.
I even attached the player as usual. He falls through as well. Dropping to the ground straight up.
Videos for ref. As you can see, they sink in the SUV and fall through the sedan if height is raised. But they seem to be attached to the BP Actor but maybe not to the mesh.