Download

Adding new child to scrollbox with contact with a collision box

Hi everyone,

I wanted to design an object that could show on itself ( something like a poster attached to a wall ) different pieces of information when the player gets near it.
Since there could be a lot of times when this would happen, I thought to create a specific widget with a scroll box inside, and then create the actor of the poster with the widget as a component displayed over the geometry.
Then I created a collision box, and my idea was that when the box is overlapped by something, the widget would be cast and the scroll box retrieved, after that a new child would be added to it.
Problem is that I cannot understand why cast doesn’t work. Could someone help me to figure this out ?