Attaching actors to players, or other actors and applying physics

I thought I knew how actors, their components, and pawns work with physics, but apparently I know absolutely nothing.

What i want to do is attach X number of actors to the player and apply physics to it all. Because the player is a vehicle, and the vehicle is procedurally generated. Originally, what i did was create an Actor, called it Vehicle, and then attach all the Blocks to the Vehicle.
Looks good:


until you apply physics:

Now, i was hoping i could just apply physics to the Vehicle actor, and all attached Block actors would magically follow suit because they are attached to the vehicle. But this isnt the case because Actor doesnt even HAVE physics to turn on. Just a scene component.

Idk what to do, or what i should be doing. Do i instead turn all the Block Actors into Block Components? Do i make the Vehicle actor into a character so it will fall down to the ground? I cant use the Chaos Vehicle Plugin since that uses skeletal meshes and my work is procedural.

So far ive tried:

  • Turning blocks into static meshes and adding them.
  • turning vehicle into character and attaching Block Actors to them. (error is player is stuck from the movement component. probably because Vehicle is attached to blocks that dont have physics enabled, so they are locked in place)
  • Adding vehicle movement component to Vehicle (did nothing because this setup wont work with Wheeled Movement Comp)
  • bIsSimulatingWeldedBodies enabled for attaching

What do you guys recommend for attaching actors/components to a parent actor and having their physics based on it?

Tell me at least what methods you tried to connect them

I am currently trying to implement something similar, except that the structure should not depend on one parent block from which construction begins, my idea is closer to space engineers

Now I have already tried two connection methods:

  • auto-welding - which does not suit me somewhat due to the strict dependence of the child - parent (there can be only 1 parent)
  • physical constraints - makes it possible to connect blocks without strict adherence to the child-parent dependency, but there is a problem with insufficient structural rigidity (begins to bend when connecting 6+ blocks)

The methods ive used are:

  • Creating an actor, giving it a mesh, and attaching that actor to a parent actor
  • Creating an actor, then procedurally creating static meshes on that actor
  • Same as #1, but turning ON physics
  • Same as #1, but using Vehicle Movement Comp
  • Same as #1, but attaching the static mesh to the player’s character instead of a parent actor

maybe it would help
runtime attach block via constraints Add Physics Constraint Runtime posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Custom Vehicle via Physics Constraints Custom Vehicles in Unreal Engine 4 - 1 - Physics Constraints for Rolling Wheels and Hitches - YouTube

Would every block be a component or a actor before attaching the constraint?

actor
when i tried to connect components my blocks disappeared

here my project were i test weld and constraints

1 Like

hi, do u find any solvation to that problem? im doing the same and find same problems :frowning: