How do I convert touch coordinates

Get help using Construct 2

Post » Wed Dec 17, 2014 7:36 pm

I have been working hard on getting a mathmatic formula(if thats how you say it in english) for converting touch.X and touch.Y in to coordinates on a layer wich is parralax X and Y 0. However I failed at it.

So I ask the community. How do you do this?
My goal?
I want to touch the screen and underneath my touch, I want a object to spawn on a layer wich has 0 parralax.

So something like
Create object "1" on layer "X" at ................................ (thats where I just can't figuire out what to do. )

I hope some genious can help me:D
B
7
S
2
Posts: 140
Reputation: 1,073

Post » Wed Dec 17, 2014 8:02 pm

Here you go. Just use Touch.X("layername") and Touch.Y("layername")...

Check this example:

touch-position.capx


Is it what you need?
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
15
S
3
G
1
Posts: 329
Reputation: 2,012

Post » Thu Dec 18, 2014 6:26 pm

You sir, are a genious. It's excactly what I needed. Thanks for your response:D
B
7
S
2
Posts: 140
Reputation: 1,073


Return to How do I....?

Who is online

Users browsing this forum: ketramtu18, Yahoo [Bot] and 8 guests