Touch x,y issues.
RabidParrot
Formally RabidParrot.Member Posts: 956
Hey Guys,
Does anyone know if changing the scene size or camera origin has an affect on the position of an actor?
My issues is that when this 'Potion' is touched it is supposed to fall. But, for some reason the screen or application doesn't recognize my finger. My rule and logic are correct. Additionally, the actor also has a linear velocity x > 300. I'm just curious as to if the speed of the actor and the size of the screen are able to throw touch coordinates off.
For those who would like to see my logic:
When touch is pressed
change attribute self.motion.linearvelocity.y to -200
That's it.
Comments
@RabidParrot I would say test it by making an actor display your potion's X and Y position for various resolutions.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
I'll probably just have a touch actor that constrains it's y and x to the touch y an x
when y and x are > 0.
Just was curious if anyone else had this issue.
So if i understand correctly, you have a potion that flies from left to right, if you tap it its suppose to fall down? And its doing nothing at all when touched, just keeps going right?
Are you switching the linear velocity x to 0 when touched? So it doesn't keep going right.
Fortuna Infortuna Forti Una
Well not entirely, but that's all the logic that mattered. The potion goes left to right. When it is tapped it falls down. Then after a period of time it plays a sound and destroys. The last part doesn't really affect whether or not the touch works.
No, I didn't change the x velocity.
There are a couple interpolate behaviors too.
Knowing is definitely half the battle.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
@RabidParrot Well there is no reason why touch is pressed shouldn't work other than... wait for it... something wrong in your code... gasp!
Perhaps there is some type of conditions conflicting with each other. If you want me to take a look at it just strip your project and send me a PM.
Fortuna Infortuna Forti Una
Impossible! I've never made a mistake! Mostly...