My child actors don't behave correctly
I am working on a controller for VR, which is basically a Static Mesh of a HTC Vive remote controller, and a 3D object in front of it. The 3D object is a child actor that can be changed when pressing a button on the controller. So far, it can be a cube or a cheese. The 3D object should move with the motion controller, since it's a descendant of the motion controller. The whole controller can also be changed when pressing another button, to switch between a sword and a shield for example.
This is the hierarchy I have :
If MyActorBluePrint is spawned using the BeginPlay event, everything works as espected. However if wait a bit (or use another event), it is spawned but it's somehow not attached to its parent, because it's not moving. GetChildrenComponents on CustomControllerChildActor returns an empty array while it returns a correct array when it's at BeginPlay, so I think there is something strange. When I change the whole controller, (or when I change the class of MotionControllerChildActor to an another one), the not moving MyActorBluePrint correctly destroyed all the time.
I simplified my script in order to have just a very simple actor, containing a movable StaticMeshComponent without physics and collisions. I attached a screenshot showing it.
What could be the problem? Do you know another solution to do what I want to do ?
asked Jul 14 '16 at 04:18 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here