I want to spawn a actor on every touch at touch location, for which i have made a blue print (image), but cant get the required result.
I can spawn a actor but spawn location is not correct. To correct this we need to convert screen coordinates to world position, but how?
You need to put camera FOV in to acount and you need to scale it right. Speaking of which whats your camera setup.
How its set up in your picture, when you tap, its going to set the spawned ball_bp to coords X-‘0’,Y-‘value of touched location x’, Z- ‘value of touch location y’.
Is this a 2d or a 3d game? I have a couple ideas that may work but I need to know more.
Game is 3D…
I want to spawn a ball anywhere i touch on the screen but at X = 0.
Is this (camera FOV) can be done using Blueprint?
I got not coding knowledge.
All the props are at X = 0, so whenever i spawn a ball it will come down and collide the props.
There is another way you could accomplish what you are after. By including the following in a Controller Blueprint:
And having an invisible wall in your level (which is behind my character) to register the Hit Location, you could achieve something like this:
Just tossing it out there as another solution.
This makes sense. Is there a way to do this with touch commands though?
Thanks Wes Bunn, this is exactly what i need
@ itzFriday this do work with touch commands (checked on simulator).