NPCs not attaching to vehicles. HELP !

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.

Sockets →

Disabling Collision when any character is attached →

Code I’m using to attach →


Edit - They just fall to the ground without actually following the attachment rule

I have tried making a new BP entirely and it still behaves the same no matter which Mesh I use.

I am having the same problem I absolutely can not get my character to sit in the seat they are literally under the vehicles and I just can’t find ANY reason.

Try this. I fixed it on my own. Use the “SetActorEnableCollision” node right when you make them sit inside the car. Disable the collision from this node. When they get off the vehicle, simply enable it.
PS : Make sure, your Vehicle’s Skeletal Mesh Physics Object has a collision big enough to cover the whole seating area of your vehicle.
image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.