GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to spawn actor with touch on a movable screen?

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

  • SocksSocks London, UK.Posts: 12,822Member

    @dark.ling said:

    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

  • dark.lingdark.ling Posts: 1Member

    Ah that works.
    Thanks Socks.

Sign In or Register to comment.