Guns, guns guns in different places.
Christ sake not another shoot people video game
I’m not telling you how to transform
Too many guns
Guns, guns guns in different places.
Christ sake not another shoot people video game
I’m not telling you how to transform
Too many guns
I also don’t like shoot games, but for learning purpose I have to learn how the pubg and super people was made
I understand.
For your relative objects you must get a location on your objects first, the relative one.
First is get location on them. Once you have your location variable you transform with that and the world will know about these locations and will add to the world location index. Each item has to be transformed properly.
Don’t do that, go to the translation screen and grab them from there, it’s not good, use get location () functions.
this group is spawned in the level and every container replaced with random item
But you grabed the items from the screen, their relative position, you took it from there before transforming. The get functions operate diferently
from screen? sorry I don’t get it
It does not work this way to get correct results.
You have to transform back and forth to make sure you get correct positions on everything
first I place this group actor in the level many times, and copy their locations and store in data table.
delete group actors from the level , and spawn the group actor on recorded location.
if the location is used, don’t use it again
There is
get initial transform, this is a relative transform of initial relative possitions.
Then there is relative transform to transform back to relative.
Then there is the world transform to transform to world from relative.
Before any of these you must get component location, and you are coping from the translation screen maybe actor locations not component location.
You have to sync everything to show up corectly, I 'm not going to post code, it took me a long time to figure out things.
Why not do part blue print, if it works for you, stay within that
If you can’t figure out how to properly transform your possitions from the relative scale to world. Because these is why you get these offsets, the offsets are small, there for you are not syncornising positions correctly
my spawn system is working perfectly, GetAllTransforms
function is synced with all group actors and the locations are translated to world transforms.
You mean these offsets?
There is no get location in your code ?
You just say get component to world
But then these components come under one component ? and the world knows just about that component not what is in it, it does not know about location of individual components , then this components will shift on relative scale because it’s the initial location on relative space.
For sure it’s a syn problem with your transformation to world.
Otherwise the offsets would not be so insignificant.
My hint is that you are getting locations from inital cpp page and then you bring them into the other cpp page to merge them under one component, when you do the relative possition gets scrambled to another number, a small offset, to correct the problem in the page where you inport all your meshes you have to do the calculations.
StaticMesh05 = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMesh05"));
StaticMesh05->AttachToComponent(NewScene, FAttachmentTransformRules::KeepRelativeTransform);
StaticMesh05->SetCollisionProfileName(TEXT("NoCollision"));
StaticMesh05->SetWorldLocation(StaticMesh05Location);
StaticMesh05->SetWorldRotation(StaticMesh05Rotation);
StaticMesh05->SetWorldScale3D(StaticMesh05Scale);
this is ok to set the parameters as world?
Yes, but why not convert that to local, you are doing this where, where you import all of your meshes and use getworld ?
In that page they need to become relative objects because they are on a master component now, sow they became relative possitions
Component->SetRelativeRotation(Rotation)
Component->SetRelativeLocation(Location)
It’s obvious you have problems with the translation of components.
These world positions you made in the independent actors have to be converted to local space in the main cpp page where you are uniting everythig.
The world position does not magicly become relative and if you do it world space will not understand and see what you have done. because you did not say they are relative space and transform to world so it knows about it.
a: I am setting location like this from vector to transform on the group actor
b: getting the actor translations in which is returned in world transforms and randomizing it and setting it
I thought Itemgroup and itemgroupref one of them is object class and one of them component pointer.
Why did you clump the component into the getworld function with the object class.
So anyway the foreign component with it’s pointer ->set relative after you import the class with getworld.
It’s my conclusion that you do not know how to use basic telemetry and make uses of the class object in a correct way in unreal C++
There for you need to do some tutorials that are abundant on youtube.
Your main flaw is trying to convert blue prints to C++.
You are not going to learn this way.
to set the return values including location for the actor to transform it