How do I use the touch direction with Chipmunk

Get help using Construct 2

Post » Mon Feb 15, 2016 10:06 pm

Hello,

I have a box with physics behavior falling from top to down when i touch the box i set the max speed to 40 which allow me to decrease the speed of fall and everything is okey the issue is when i want to change the direction of that box ( after the click) with swipe left or right i have tried the force but it doesn't work, the box is still fixed to the same target.
B
5
Posts: 27
Reputation: 281

Post » Tue Feb 16, 2016 10:22 am

Try having it set the box.angle to touch.angle might not do the job properly, but will introduce you to using the .angle property.
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Tue Feb 16, 2016 12:30 pm

emoaeden wrote:Try having it set the box.angle to touch.angle might not do the job properly, but will introduce you to using the .angle property.


Thanks for your reply could you please give me an example ?
B
5
Posts: 27
Reputation: 281

Post » Thu Feb 18, 2016 5:29 am

This is a quick and messy version. Realistically you should put in code to check if you are using a touch device or mouse device.

Ta da !
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Fri Feb 19, 2016 12:08 pm

Message: MarkeGamer can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
emoaeden wrote:This is a quick and messy version. Realistically you should put in code to check if you are using a touch device or mouse device.

https://www.dropbox.com/s/ikq6fkkkxying43/TouchMoveAtAngle-3bf0x83iljqa5.capx?dl=0 Ta da !


its okey thanks
B
5
Posts: 27
Reputation: 281


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 67 guests