Point and Click after Camera movement

Hey Guys,

Has any one had the problem of moving to or spawning an actor at touch position after the camera has moved?

I've created a touch box that when touched spawns an actor at touch position x and y which works fine but as soon as the camera has moved game salad no longer accurately finds the touch position. The actor that should be spawned at touch position spawns as far away from the intended position as the camera has moved.

Any help would be super appreciated.

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    You need to build in an offset.. that allows for the cameras new position...
    Here's an old but excellent tutorial video from Tshirt Booth... / GS Helper.

  • sean121087@msn.comsean121087@msn.com Member, PRO Posts: 7

    Stormy Studio you are a beautiful human being.

    I'm not sure how I didn't find this but thank you.

    I did find however that when I clicked, the camera would be stationary and when the actor moved to the click position, then moved the camera with it the camX and camY real position would no longer be relevant. I got around this by spawning an actor where ever the player clicks and then have the player actor move to that newly spawned objects position instead. This worked!

    Basically I had no idea what a 'real' game attribute did but now I know and now I am able to do a bunch of things I previously could not. So thank you.

Sign In or Register to comment.