Unfortunately it’s the first time I’m using the UE and everything seems very non-intuitive.
The thing is, I need to create many constructions of physic-instances (simple cuboids/scaled-cubes) attached to each-other with various constraints.
However, those constructions need to differ and to be created at runtime with computed values - so I cannot use the editor or blueprints and have to do everything in C++. Or am I wrong about this assumption?
Could someone redirect me to a proper tutorial or example which shows how objects are created and attached in C++?
Could you explain(/give an example) about what kind of “computed values” you mean? because it sounds like it can be easily done with blueprints (are we talking about simply attaching a few cubes together or…? :p)
It should be fairly easy to attach physics objects together at runtime by spawning physics handles and/or constraints components without having to use C++ (but if you do need to do it from C++ then you should already have what you need from Rama’s tutorial(s), perhaps you are trying to dive too deep too soon? :p).
Well, as described in that other thread, I’m trying to use UE for repetitive physic simulations.
That means I will create a basic concept out of a cube in the center and two lines of cuboids attached to the main cube through constraint and or actors.
The values I mean are the details and settings of all those constrains as well as optionally the size of the cuboids. So at runtime, the final system will create several of those basic concepts bit with differing values. For example one will have very strong/narrow constrains while another has weaker ones and so on.
Well, that could be it… but just not really sure how to get into the thing without learning the “whole” UE since I definitely don’t have the time for that.
This will spawn and attach 2 cubes together, the same nodes can be used to attach as many as needed.
And you can set the constraints parameters, in the image above I simply set the swing limits to Locked (all in runtime).
Ohh, wow, you did that with the video just for me? O:
I feel very honored!
Hmm, interesting, but still I’m unsure whether that suffices for what I need. The core of my project will be the intelligent algorithm after all.
That one will be definitely written in C++ and compute the values for all the constraints, so I cannot hardcode the constraints into the editor!
Or is it possible to create a sort of template with blueprint and then execute that blueprint through C++ with arguments as if the blueprint were a function and the values its arguments?
That would be perfect, but from what I’ve seen so far, that’s not how blueprints work…