This site requires JavaScript, please enable it in your browser!
Greenfoot back
Kartoffelbrot
Kartoffelbrot wrote ...

2014/7/10

Axis Aligned Bounding Box

1
2
Kartoffelbrot Kartoffelbrot

2014/7/17

#
But it seems to be still buggy :,(.
danpost danpost

2014/7/17

#
I have been working on a simple solve for this. I am having problems with the boxes 'transporting' to totally off positions (however, very infrequently). There seems to be nothing within my code that would produce this behavior; yet, it is there.
Kartoffelbrot Kartoffelbrot

2014/7/17

#
My problem is, that it doesn't work, if one is too fast. Mostly it works, but sometimes it gets pushed out the object at the wrong side.... Which is very annoying, if you run against a wall :/ . I suppose the mistake is in checking on which side the object entered. But I noticed the problem you have, too. But that could be another problem in my case, so I don't mind that at first.
danpost danpost

2014/7/18

#
I posted what I had as far as trying to make the boxes collide properly. This is as close to perfect, without being perfect, that I have been able to get.
danpost danpost

2014/7/18

#
I updated my scenario. What I do when a collision occurs after moving is this: * move back to original location before move; * save original location coordinates * step move until collision occurs * save the colliding box in a local variable * step back once to not intersect box * complete the move in reflective direction (bounce) * if intersecting another box, move back off it * make sure movement direction of other box is that which is moving away from collision
Kartoffelbrot Kartoffelbrot

2014/7/19

#
My browser always blocks the scenario and I don't know how tu undo that :(.
danpost danpost

2014/7/19

#
Kartoffelbrot wrote...
My browser always blocks the scenario and I don't know how tu undo that :(.
You could start an 'Other' discussion on how to fix it. Supply your set-up (system, browser, java version) and what message you are getting when trying to view a scenario.
You need to login to post a reply.
1
2