I am attempting to make a vehicle that the player can customice by adding multiple blueprints to it in different locations, each with a different functionality. The player finds the main piece of the vehicle and then starts attaching new pieces to it. The way this works is that pieces placed are attached with the attach to actor node, keeping world location, keeping world scale and using relative rotation, checking the weld bodies node. It works fine, just as intended, but… When i add the attachments to the vehicle without moving it, i can go up to hundreds of them without any sort of lag or fps drop, ranging from 50 to 60 fps usually and only when the vehicle moves with many bps attached to it the fps drop. The more i add the lower the fps go, which means that moving so many different assets is giving the engine a hard time. Usually the lowest i go is about 9 fps before i decide to just quit and look for a different way to do things… (which ofc i havent found yet :c)
Additional notes that might be important:
-
The vehicle is suposed to fly, its not a car, so it doesnt really need physics simulations because the way i intend it, is a non realistic way, it kinda moves as if it levitated, so no need for physics simulations if there was a way to make attached components collide with the world and block the vehicle without having to enable the physics simulation on the root.
-
Currently, the vehicle is using physics enabled on its root, which is a mesh, simply because the only way i have found to make the attached components collide with the world and prevent the vehicle from moving and making those pieces clip is by making the root simulate physics. This means that, while the pieces do not simulate physics when you add them, when they are attached they act as physics bodies, which could explain why i have such a massive fps drop, because the engine is moving tons of physics simulating assets. (The moment the bps are attached, even if the engine says their physics are disabled if you run on tick a print string that reads the bool of their physics enabled, they act as if they had physics enabled in some ways. If i were to uncheck the weld square on the attach node, the bps would just fall off… Which means they are indeed activating their physics when they get attached…)
-
To further prove that the attachment bps are simulating physics even if they are not meant to, i found a weird phenomena which hadnt happened to me before, which is that the attached bps, if you attach them in a straight line, they start to go down, as if they were a rope or chain links… Which is not good because they are meant to follow a grid when they move, and the fact that they can move like that is posible, means the grid is no longer followed when i build attachments on top of attachments…
I know this is a wall of text but im typing this very tired right now after trying all day to find a way to fix this… i just want to sleep at this point… Hopefully someone can help me with this, i would really appreciate it. Thanks in advanced to anyone trying to help me out!