Download

How To Weld Two Skeletal Meshes Together W/ individual Anims C++/BP

I’ve been trying to create tractor and trailer (like farm tractor not truck tractor but same idea) setups that allow a player to hitch up to a trailer. I had success by creating a regular vehicle for the tractor and using a spawned physics contraint actor for the hitch onto a static mesh with physics constraints based wheels but it sucks… the trailer hitch point bounces around and the littlest movement from normal makes it go flying into space. You can see the results here, its almost useable but no way professional.

[video]Unreal Engine 4 Trailer Hitching - More Stable With Sockets/No Axles - YouTube

Is there anyway to take 2 skeletal meshes and “weld” them together. Lets say for example I had a bone sticking out the back of my trailer at the hitch and sticking out the front of my trailer at the hitch BUT still allow each to have their own animations?

That way I can just fake all the moving parts with animation. Blueprints would be preferable but code would work as well.

I’ve tried attach actor to actor with very limited results. I need to be able to pick 2 bones and weld them together and still be able to control those bone movements so that I can say when the tractor is steering at x degrees at y speed the trailer should rotate z degrees at xX speed.

I’m trying to re-create a small map and some vehicles from farming simulator 2015 as a pet project but they coded their own engine (Giants Engine 6.0.2)

Ideas? Thanks.

Have you looked at using Sockets like in an FPS where you pickup a weapon Attach skeletal mesh(weapon) to another sk. mesh(player) - UE4 AnswerHub this link might offer some info