I successfully created raycast, thanks to cpp-test examples.
But when I use Follow::createWithOffset on my hero then raycast only works on initial screen!
raycast draws but doesnt recognise collisions after initial screen
to reproduce problem,
1-Create raycast on location out of initial screen (if screen 800x600 place ray point 1 to Vec2(2900, 500) etc, )
2-Just add sprite and start camera follow on it
3-Move sprite (you can implement mouse pin joint to move) to x:2900 and check ray on that sprite whether collide or not