- Home /
Touch pressure not updated when stationnary
Hello!
I'm currently working on the new touch pressure functionality using an iphone 6S and Unity 5.3.4f1.
At first, the pressure of a touch always return 0 whatever the amount of pressure I put on the screen.
It is only if I start moving that this value will be updated.
If I don't move my finger (basically if the touch stays in stationary state) Touch.pressure will not be updated and returns the last known value (0 if I never moved or whatever it was if I moved that finger before).
My test code is really simple so I don't think it is a script issue :
void Update() {
if(Input.touchCount > 0){
pressureTest.text = Input.GetTouch(0).pressure.ToString("0.00");
}
}
As it seems counter-intuitive to not update the pressure while being stationary, I'm wondering if I did anything wrong. For now the whole thing feels imprecise and insensitive because of this behavior.
What can I do? Thanks for any idea!
I cant help noticing you arent using GetTouch
Thank you for pointing that out. Is it really a big problem?
I fixed that but as it is not related to my problem, it didn't help.
Calling GetTouch should give you updated data.
Also, spotted this
http://docs.unity3d.com/ScriptReference/Touch-maximumPossiblePressure.html