Touch rotate how?
iraqiraq
iraq baghdad , muslimMember Posts: 89
hello every body i see new game in google play like spinner fidget
he click on spinner if the finger right the spinner go right if the finger left the spinner go left . if touched not much he move easy if touched very speed he go speed .the spinner stoped with touch power if you know what i mean
how i make like this ?
Comments
no answer or just some helps steps ?
To answer the spin direction:
You want two real attributes (Touch_Start) and (Touch_Stop). Then make an actor on the background (size of whole screen) and when touch--> is down :: change attribute Touch_Start) to mouse.postion.X.
Then touch--> is released :: change attribute Touch_Stop) to mouse.postion.X.
Then (on release) if start is greater than stop, rotate at (whatever speed you want) counterclockwise. If start is less than stop, rotate (again whatever speed you want) clockwise.
In terms of a harder press--> faster spin and vice a versa, I don't believe GS can detect the pressure of a touch.
Perhaps link to a video. I'm afraid I really didn't follow your description very well.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@elementappdev CAN YOU MAKE A DEMO PLEASE BECUZE SOME RULE I DONT KNOW HOW YOU MAKE IT!
@Armelline I DONT HAVE A VIDEO BUT HAVE A LINK
https://play.google.com/store/apps/details?id=com.bm.fidgetspinner
You realize that ALL CAPS indicates YELLING online?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
THIS NEW LAPTOP LOL
//
@socks not copy paste thing ! i just need how i know make like that in gs just to be a pro like you or another developer in gs
//
if i make spinner how i make it ? becuze i dont have a pro account ! and how i upload to gs ? i dont have a pro account you know i cant make any thing like this just i need to be a pro of gs games not make copy paste games
@elementappdev mean i make 3 rule ?.or just one rule and greater than in else ?
@iraqiraq Is this what you want ? i attached a demo
@Icebox thnx my brother but i need know how i make it with mouse x ! becuze i need learn it .or how i make it without button just roll the spinner
The centre of a triangle is 2/3rds of the way along each of the three medians, so if you have an equilateral triangle like a fidget spinner, and it is sat like an arrow pointered upwards (▴) the centrepoint will be 1/3 of the way up the image/actor, whereas leaving the centrepoint 1/2 of the way up (GameSalad's default) will give you that weird disjointed rotation !
@Socks thnx for this advice you helped me 70%
Thanks for the info socks !
@iraqiraq This is simple , you only need the fidget actor and this rule
{if mouse button is down
(create another rule inside)
[if game.mouseposition.x > game.screen.size.width/2 ( if mouse is at the right side)
rotate clockwise
otherwise
rotate counter-clockwise]
otherwise
}
thats it
thnx @Icebox but this if clicked /if your finger out side the spinner he stop moving .im not need stop . i need him stop slow to 0
"i need him stop slow to 0"
Increase angular drag to slow down a rotating actor.
@Socks VERY THNX TO HELP ME
This spinner demo might be useful:
RThurman Your spinner example is just what I have been looking for to create a steering wheel for a driving game. If you could help further I would be grateful: How do you constrain the movement so it rotates only left or right say 45 degrees each way from centre? Many thanks
@tmagames It's unlikely @RThurman will see this unless you notify him which is what I've done by including the '@' symbol before his forum username.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tmagames You might want to look at this example of knob rotation:
https://forums.gamesalad.com/discussion/comment/413634/#Comment_413634
You just change the min and max values to get the limits you want. For your example you would use:
max(45,min(135, self.Rotation + self.changeInAngles ))