@torsle30,
Please let us know if you are using GameLab or AppLab (or something else) and it is also helpful if you send a link to your project. It looks like @IMPixel sent you some code that may help if you are in GameLab.
Thanks,
Mike