-
koko82Likes 0
There seems to be a good link here but its for cocos2d no x.
https://muhammedalee.wordpress.com/2012/04/01/using-swipe-to-flick-a-body/
This reply has been verified.
-
Sonar Systems adminLikes 0
You should be able to easily modify this for Cocos2d-x
We know of a library to support Swipe but that’s swipe in general.
This reply has been verified.
-
koko82Likes 0
The problem with above its in 2d format not x also using a lot of depreciated terms. Is there anyway to create an angle based on touch movements. For example on touchbegan get x and y positions then on touchmoved x & y and then differenciate between the two points to set an angle of the sprite force?
This reply has been verified.
-
Sonar Systems adminLikes 0
Sort of like Angry Bird?
This reply has been verified.
-
koko82Likes 0
Kind off but you can flick anywhere on screen (not pulling back) just swipe direction mainly want it to go. Seems like you can set an angle for sprite>?
This reply has been verified.
-
Sonar Systems adminLikes 0
Angle? What method are you taling about?
This reply has been verified.
-
koko82Likes 2
What is the method to setting an angle on a sprite? Its setting it based on touch to apply a force lets say you swipe left, right, up or down it then moves the sprites force in that direction (or whatever angle you swipe).
This reply has been verified.
-
Sonar Systems adminLikes 0
Do you have a method that you know of or are you asking if there is one?
This reply has been verified.
-
koko82Likes 1
I am asking if there is one. Then set based on swipe with a force. Which would be better force or velocity?
This reply has been verified.
-
Sonar Systems adminLikes 0
This maybe a good start for you:
http://discuss.cocos2d-x.org/t/move-a-sprite-relative-to-speed-of-swipe/6352
This reply has been verified.
Login to reply