Drag According To Speed of Swipe
Hi,
Using a previous template, I've gotten my background to move downwards when I swipe down by setting up new attributes. So now when I swipe it goes down the speed I've set it to. But because I'm making a racing game, I want the swipe of the speed to vary. The faster the swipe the faster background moves and the slower the swipe the slower the background goes down. How would I do that. Also another thing which comes second and that's related to this post is that I want my background to gradually slow down, so when the swipe is finished it moves but begins to slow down. Can anyone help?
This is basically my reference to how I got my background to move when I swipe down but it moves constantly and this video doesn't show how to slow down gradually and doesn't consider the swipe of the speed:
This is what I have so far in my background actor that move:
http://postimg.org/image/663eblw9j/
This is what I have for the swipe actor:
http://postimg.org/image/itohijzv5/
Comments
Yes! I've got the dragging by speed down with the help of this: http://gshelper.com/shop/free-templates-and-tutorials/actors-speed-depending-on-swipe-speed/
Now all I have to get right is the gradual slowing down. So if you're reading this, that's what I need help with.
This might help?
http://www.deepblueapps.com/drag-around/
Darren.
Also another thing which comes second and that's related to this post is that I want my background to gradually slow down, so when the swipe is finished it moves but begins to slow down. Can anyone help?
In addition to what Darren said . . .
I don't know how your game is set up, what is moving, whether it's the camera or a background actor or how you have it moving . . . but in the thing you want to gradually slow down, open up the physics attributes and turn 'Drag' up to a high value, try something like 500 to start with . . .
@DeepBlueApps
Very nice downloaded your demo!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
When I open the scene to view the actors it reads "unlocked see actor in scene." I really want to implement what that scene is doing but for some reason the actors only show notes
Go to the scene editor, click on layers and look for the actor instances their. Double click on them to open them up.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
The thing is I'm not using that format. I'm not using the camera, neither the zoom. What I am using is this: Currently when I swipe and let go it just stays at a constant rate.
This is for the moving actor and the last part says Destroy: http://postimg.org/image/5f81w9u29
The non-visible move actor that lets you swipe: http://postimg.org/image/69ghm5o8t
My attributes are all 0 and real. I've been trying hard to slow it down but I just can't seem to find how to, but still nothing. I really hope you are able to help.
Try adding a constrain attribute behavior. Add it as the second behavior in the list. (Just after the first constrain behavior.)
Constrain Attribute: self.RubSpeed To: self.RubSpeed*.96
I did that, but it's still not as smooth. I want the slow down in accordance to the speed, if you know what I mean:
my project: https://drive.google.com/folderview?id=0B1lmbRxg1JOgMFhiTnRmbGpLN3M&usp=sharing
Mess with the ".96". Put different values in there until it feels about right. The value you want will probably be between .91 and .999
Perfect!