Child static mesh doesn't follow it's parent collision sphere

Hi everyone!
My problem is the following: I have a C++ class of Button, the sphere collision is it’s root component and the static mesh is the child of sphere, and the child is not following the parent’s transform when rotated. I expected this to be the opposite, because, as I understand, inhereting the transform is one of the functions of this parent-child relationship and thus this problem shouldn’t occur, I’ve created actors with this structure many times and this was never an issue.
Initialy the mesh didn’t spawn in sphere’s location either, but I adjusted this via code directly, though I suspect this is not the best way and the problem lies deeper.
My idea is that the button represents the end of the level in the maze so it needs to be a part of it’s geometry. The maze itself is rotated with the mouse. When I spawn the button it’s collision spawns attached to the floor and follows it when the maze is rotated, but the button mesh stays in place.
Here is the code and the screenshots.


The code of spawning the button.


image
The maze itself is a static mesh created with BSP and then converted to static mesh, it has complex collision as simple.

I tried to change collision settings but it seems that collision has no effect on it at all. I changed the parent-child relationship to vice versa, but this gave me unreadable errors.

I don’t really understand what is causing this problem and I’m a bit lost since I don’t know in which way I should look for the solution. Maybe I’m missing something very obvious but I’ve spent several hours trying to figure it out and haven’t found this yet. So any suggestions on what to check or change are highly appreciated!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms