Collision box simulated with offset

Hi guys,

Just one info.

I just updated Corona yesterday from 2016.2871 to latest public release Version 2016.2992 (2016.11.10)

When I run the same game in 2016.2992 collision boxes are simulated with offset to the right from the players.

I run that in physics hybrid mode.

But surprisingly collisions are behaving normally.

Collision box moves faster than the player (player is owner of that fast moving collision box).

This does not happen in Corona 2016.2871.

When I run back the same code in 2016.2871 collisions are behaving normally also, and collision boxes are centered with the players as expected (they move at the same speed as expected).

I updated my xCode.

I build my app on iPad 2, and on iPad 2 collision box also moves away from the player (same as in Corona Simulator).

I move players via transition.to to the right screen side.

I repeat this does not happen on 2016.2871 build

Maybe somebody knows what is going on ?   :rolleyes:

Thanks!

Ivan

Please, please, please, please, please, please, please POST SOME CODE.

Just referring to stuff going on in your app with references to things you have and no actual code does not help anyone provide an actual answer.

The Golden Rule: If you want help on a code problem provide some code that demonstrates clearly and simply your problem. Otherwise others will just create what they guess is the code you have, find no problem with it and not help you.

Hi Horace,

Impossible to post my code because my main.lua has 6600 lines of code, and will soon be ready for release  :smiley:

I created a simple example attached.

Please run it, and I hope you will notice that player collision box moves “faster” than the player.

I did not experience that in  2016.2871  build, but yes in latest public release 2016.2992

I just tested it in latest daily build 2017.3025 , and the same problem persists.

What is so strange: collisions behave normally, so it seems like this is “just simulation”, or everything shifts for the same amount.

Let me know. 

Thanks!   :smiley:

Ivan 

I think posting the code using the code button would be fine. Generally (and this is a personal preference, admittedly) I will not download a zip file just to look at someone’s code from the forum.

Anyway, I think you must have changed something else with your code if it works fine but appears different. All I can see is that the physics box is moving separate from the display object, which I would expect if the ‘camera’ were moving. This means that the physics world is still relative to 0,0 but the parent group of the display objects is being moved.

If the collisions are working as you expect it means that the display objects you’re tracking with the camera are moving properly and are not in the wrong parent groups.

Maybe I’m missing the point?

Thanks Horace.

Please note that until  2016.2871  build player and collision box were fixed (as they really need to be).

Now, I cannot test my game in physics hybrid mode, because in 2-3 seconds physics boxes are out of the screen bounds and I do not see any collision boxes anymore (that is my point).

I do not think this is happening because any of my code changes.

Ivan

Have you made a boiled down version to demonstrate this and submitted a bug report? If not, I think you should. You need to be able to really easily demonstrate in the problem in as little code as possible and without external libraries.

I think this is the problem where you have all your physics objects in a group and then move the group. I’ll make a demo for you…

Here’s a repro

http://pastebin.com/a7KvzwFx

Hi guys,

My point is that when you run zip code in 2016.2871 this problem does NOT happen.

I think I will file bug report.
Without camera problem does NOT exist.

Thanks roballison, I will check repo link.

Feel free to file a bug report, but this is a known issue. We made a change between 2871 and 2992 that changed where the hybrid box is drawn. It’s actually “technically” correct now. But we have many people using camera’s and moving groups. I’ll ping engineering again today about it.

Rob

Hi guys,

Bug report filed.

Ivan

Hi Rob,

Corona 2016.2871 does not work on new Mac OS Siri.

So no way to test hybrid physics mode + camera anymore for people that went on Siri.

Problem is in Sandbox, it returns nil where newer Corona version does NOT (i.e. work fine).

Ivan

Look at 3028 or later. We reverted the change to so that people translating/scaling groups will see hybrid work the way they expected. But be aware this change was to fix another bug with hybrid drawing, but apparently that’s less of an issue than the change to fix it.

Rob

It works, thanks.

There is additional non-collision box around each body, I will disregard it (I do not know what it represents).

Please, please, please, please, please, please, please POST SOME CODE.

Just referring to stuff going on in your app with references to things you have and no actual code does not help anyone provide an actual answer.

The Golden Rule: If you want help on a code problem provide some code that demonstrates clearly and simply your problem. Otherwise others will just create what they guess is the code you have, find no problem with it and not help you.

Hi Horace,

Impossible to post my code because my main.lua has 6600 lines of code, and will soon be ready for release  :smiley:

I created a simple example attached.

Please run it, and I hope you will notice that player collision box moves “faster” than the player.

I did not experience that in  2016.2871  build, but yes in latest public release 2016.2992

I just tested it in latest daily build 2017.3025 , and the same problem persists.

What is so strange: collisions behave normally, so it seems like this is “just simulation”, or everything shifts for the same amount.

Let me know. 

Thanks!   :smiley:

Ivan 

I think posting the code using the code button would be fine. Generally (and this is a personal preference, admittedly) I will not download a zip file just to look at someone’s code from the forum.

Anyway, I think you must have changed something else with your code if it works fine but appears different. All I can see is that the physics box is moving separate from the display object, which I would expect if the ‘camera’ were moving. This means that the physics world is still relative to 0,0 but the parent group of the display objects is being moved.

If the collisions are working as you expect it means that the display objects you’re tracking with the camera are moving properly and are not in the wrong parent groups.

Maybe I’m missing the point?

Thanks Horace.

Please note that until  2016.2871  build player and collision box were fixed (as they really need to be).

Now, I cannot test my game in physics hybrid mode, because in 2-3 seconds physics boxes are out of the screen bounds and I do not see any collision boxes anymore (that is my point).

I do not think this is happening because any of my code changes.

Ivan

Have you made a boiled down version to demonstrate this and submitted a bug report? If not, I think you should. You need to be able to really easily demonstrate in the problem in as little code as possible and without external libraries.

I think this is the problem where you have all your physics objects in a group and then move the group. I’ll make a demo for you…