postCollision event.force Extremely High on Some Devices

Hi everyone,

I’ve got an interesting question and not sure what might be the issue.

I’ve got a game that involves cars rolling up/down bezier curves.  The bezier curves are using chain physics so that the cars sliding down the hill don’t get stuck at the joints of the curve (really just several small lines).

I have logic that if the car hits and has a collision with a force greater than 3 that the level is over.

So far in testing there haven’t been any issues.  But on one phone (Amazon Fire Phone) the cars initially drop about 5px onto the curve and get an initial force of 7.2874997370296e+21.  Yet every other test has the force below 3 (usually in the 1. range).

Any ideas why one phone would seemingly have super sensitive physics with really high force readings?

I’m still trying to work on replicating this in something stand alone but haven’t been able to yet. 

Hi @Fernker,

It’s odd that the one device would be doing this. If you can replicate this on any another device, let me know… also, it may help if you post your basic collision setup and handling code here for reference.

Best regards,

Brent

Sure here’s some basic code:

To add the collision starts here (Train object is made up of 3 car objects in this case):

train.addCollision("front","postCollision",gForceCollision)

Calls function in module:

obj.addCollision = function(carPos,type,callback) if carPos == 'front' then linkCollision(frontCar,type,callback) end end 

Calls private function in same module:

local function linkCollision(object,type,collision) object[type] = collision object:addEventListener(type,object) end

Then I have a listener function:

gForceCollision = function(self,event) if(event.force \> 3.3) then gameOver() end end

Sorry for the delay.

I was able to replicate this happening on another Amazon Fire phone.  So far this is the only type of device I am seeing this on.

I really don’t know what advice I can offer on this. It appears to be an OS-specific issue, and thus pretty hard to diagnose. Do you have a Kindle device to test on?

I sadly don’t.

I didn’t realize this until my friend told me that the Fire phones are discontinued (which I didn’t realize).  So I guess for now I will just wait and see if I get this issue on a non-Fire phone.

If I do I’ll be sure to post an update here as well as creating an isolated replication of the issue.

Hi @Fernker,

It’s odd that the one device would be doing this. If you can replicate this on any another device, let me know… also, it may help if you post your basic collision setup and handling code here for reference.

Best regards,

Brent

Sure here’s some basic code:

To add the collision starts here (Train object is made up of 3 car objects in this case):

train.addCollision("front","postCollision",gForceCollision)

Calls function in module:

obj.addCollision = function(carPos,type,callback) if carPos == 'front' then linkCollision(frontCar,type,callback) end end 

Calls private function in same module:

local function linkCollision(object,type,collision) object[type] = collision object:addEventListener(type,object) end

Then I have a listener function:

gForceCollision = function(self,event) if(event.force \> 3.3) then gameOver() end end

Sorry for the delay.

I was able to replicate this happening on another Amazon Fire phone.  So far this is the only type of device I am seeing this on.

I really don’t know what advice I can offer on this. It appears to be an OS-specific issue, and thus pretty hard to diagnose. Do you have a Kindle device to test on?

I sadly don’t.

I didn’t realize this until my friend told me that the Fire phones are discontinued (which I didn’t realize).  So I guess for now I will just wait and see if I get this issue on a non-Fire phone.

If I do I’ll be sure to post an update here as well as creating an isolated replication of the issue.