Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

bug with 2d box collision
Started by yvandotet Jun 08 2018 05:46 AM

3 replies to this topic

Best Answer yvandotet , 11 June 2018 - 01:38 AM

Ok I finally find what was erroneous in the code.

I also thinking that the docs speaks about changing the value of ball.x during the collision, but reading the value is allowed and does no disturbances.

In fact during my calculation I done one moment a wrong calculation that replace vx by an invalid number, something like √(-230) !

Thanks and Ciao 

Ok I finally find what was erroneous in the code.

I also thinking that the docs speaks about changing the value of ball.x during the collision, but reading the value is allowed and does no disturbances.

In fact during my calculation I done one moment a wrong calculation that replace vx by an invalid number, something like √(-230) !

Thanks and Ciao 

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 170 posts
  • Corona SDK

Hello,

 

have you ever seen a bug when a dynamic ball object collide with the extremity edge of a kinematic rectangle.

 

I speak about a brick breaker game, the ball touch the horizontal bar on the corner, and sometimes there are classical collision, sometimes there are a bug (  and statics objects like walls disappear ).

 

And the log error print no error !

 

Is someone have an idea about that ?

 

The ball has 8 radius and the rectangle bar has 100 width + 14 height, so the tickness is not the problem.

thanks



[TOPIC: post.html]
#2

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 170 posts
  • Corona SDK

When I print the x coordonate of the hidden wall, I see that the wall is not removed but print 

wall.x = 1.#QNAN

log error show nothing.

I think it is an inside bug on corona fondation. 

 

edit : here is 2 videos

 

https://youtu.be/97O25OB2_fU

 

https://youtu.be/rTjPW0eYQ8k



[TOPIC: post.html]
#3

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 170 posts
  • Corona SDK

ok guys, I understand.

It's because I used the x coordonnate of the object involved during the collision that there are bugs.



[TOPIC: post.html]
#4

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 170 posts
  • Corona SDK

  Best Answer

Ok I finally find what was erroneous in the code.

I also thinking that the docs speaks about changing the value of ball.x during the collision, but reading the value is allowed and does no disturbances.

In fact during my calculation I done one moment a wrong calculation that replace vx by an invalid number, something like √(-230) !

Thanks and Ciao 

Ok I finally find what was erroneous in the code.

I also thinking that the docs speaks about changing the value of ball.x during the collision, but reading the value is allowed and does no disturbances.

In fact during my calculation I done one moment a wrong calculation that replace vx by an invalid number, something like √(-230) !

Thanks and Ciao 




[topic_controls]
[/topic_controls]