How to spawn actor with touch on a movable screen?
dark.ling
Member Posts: 1
I have a primary actor and a secondary actor. The camera will follow the primary actor while the secondary actor is spawned at the point where I touch the screen. When the level start, before the camera start to follow the primary actor it works fine. But once the camera follow the primary actor I can no longer spawn secondary actor at touch position. The secondary actor will always be spawned on the main frame(i.e the screen at the start of the level). Any solution guys?
Answers
Add the camera offset to the touch position.
So intend of spawning at . . .
Mouse.position.X
Mouse.position.Y
Spawn at . . .
Mouse.position.X + Camera Origin.X
Mouse.position.Y + Camera Origin.Y
Ah that works.
Thanks Socks.