Search found 11 matches

by klemen
Mon Feb 23, 2015 2:05 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

I dont use physics feature of Polycode. Its based on Box2D 2.1.0, so i use it only for graphics and sound. It doesnt have support for joints, that I need. If you look the source code of Polycode, you will see, that code is very well structured and written. I think adding support for other joints isn...
by klemen
Mon Feb 23, 2015 11:53 am
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

You are right. Since drawing functions are virtual, i can implement them with Polycode functions. And yes... this wouldn't change my program a lot. I will do that. Oh... and another thing.... i would like to to say, that I am (and may others too) very impressed with your work with open source projec...
by klemen
Mon Feb 23, 2015 8:14 am
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

Yes. It was separated from my program. I used the testbed that ships with box2d. I exported scene from RUBE editor and paste it in testbed. If i would want to use b2Draw, I would have to completely change my program, since almost every part of it has Polycode calls in it. I would do that... but i wa...
by klemen
Sun Feb 22, 2015 3:10 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

I've found a bug in my code. There were two same calls for loading from json file. My scene had a duplicate for every object. Of course i was rendering just one. It seems, that this worked if there were no bullets. If there were bullets, those duplicates were pulled apart - hence invisible edges of ...
by klemen
Sun Feb 22, 2015 8:49 am
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

Thank you for taking your time on this issue. Everything in debug draw works as it should. With or without bullets, simulation in debug draw is flawless.... so, obviously there is something wrong with my program. It doesn't matter how simple i make my scene... if there are bullets, sprites just aren...
by klemen
Sat Feb 21, 2015 8:27 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

No. This is from my program. Debug draw simulation with continuous physics works ok.
by klemen
Sat Feb 21, 2015 4:48 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

Thanks for the answer.... At the http://www.klapa.eu/continuousYES.gif you can check what i mean by the weird behaviour. Here is continuous physics enabled. At this example http://www.klapa.eu/continuousNO.gif there is continuous physics disabled. This is how i call update in both cases at 60Hz: thi...
by klemen
Sat Feb 21, 2015 3:26 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

hm... I was to quick with my verdict about this. Of course if you turn off continuous physics, you also disable bullets. So i am at the beginning again. Current status is: If i disable continuous physics, simulation works nice. Sprites rotate and change position, as they should. Joints behave as exp...
by klemen
Sat Feb 21, 2015 8:04 am
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

Hi. I've tried debug draw. Simulation works the same as in RUBE editor, if warm start, time of impact and sub-stepping is set to true. So... obviously something is wrong with my program. So i decided to check everything again. And I found nothing. Then i tried to play with SetContinuousPhysics. I fo...
by klemen
Fri Feb 20, 2015 1:38 pm
Forum: Box2D tutorial discussion
Topic: weird simulation
Replies: 18
Views: 49541

Re: weird simulation

Thank you for your answer.
I will try to use debug draw and see what happens... i'll post my results....

bye,
Klemen