Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

event.pressure returning nil
Started by philipp3 Jan 13 2020 11:46 AM

2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

philipp3

[GLOBAL: userInfoPane.html]
philipp3
  • Enthusiast

  • 84 posts
  • Corona SDK

Hello,

 

Strange behavior on my iPhone X: It should print a value for event.pressure, but I get nil.

When I soft-close it and open it again, it works in about 1 of 3 cases, and I don’t see any reason.

 

The same code used to work not so long ago, I don’t know why it stopped working.

 

Corona Build 3567 (or 3556), iPhone X, iOS 13.3

local function onTouch(e)
    print ("!!!", e.pressure)
end
Runtime: addEventListener("touch", onTouch)


[TOPIC: post.html]
#2

ldurniat

[GLOBAL: userInfoPane.html]
ldurniat
  • Contributor

  • 400 posts
  • Corona SDK

Hi @philipp3,

 

I don't use iphones at all. Maybe it is related with settings of 3D Touch on the device?

 

 

Have a nice day:)

ldurniat



[TOPIC: post.html]
#3

philipp3

[GLOBAL: userInfoPane.html]
philipp3
  • Enthusiast

  • 84 posts
  • Corona SDK

Hi @philipp3,

I don't use iphones at all. Maybe it is related with settings of 3D Touch on the device?


Have a nice day:)
ldurniat


I think this is a bug, but I don‘t know if it‘s on the Corona or Apple side. When I close the app often enough, it will eventually print the pressure again 🤷🏼‍♂️


[topic_controls]
[/topic_controls]