Hey! I haven’t posted in a bit.(I got bored of Panda3D until I decided to get the newer one)
I found a small glitch in the Labyrinth sample. When I move the cursor accross the Panda3D window(or even drag it across) the maze doesn’t tilt and the ball doesn’t roll.
Is there a quick bugfix for this? I really want to see how it works because I am interested in adding something just like that(rolling a ball through a maze) into my game.
I don’t think I’ve ever seen that bug before. I’ve seen the ball leave the maze on occasion (initialization lag), but not it hanging. Are there any weird warnings or errors in the console? What platform are you running on?
Ive not seen that bug either, however you post did inspire me for my latest mucking about with multiple windows
You can see it here…
I did, however, find a bug with the collision on multiple windows
If I hold or move 1 window about whilst the ball is moving, the ball tends to go through walls Its like the ball position is being updated but the collision detection is not kicking-in.
No time atm to check through the c++ code to find where the problem is, Ill try if I get a few mins.
No, I can’t even tip the maze(is it supposed to tip?)
The board tilts and thats what moves the ball.
Right. And the sample COMPLETELY ignores the cursor position. I can’t tilt the board, let alone roll the ball.
Ah-ha! Here’s the line that kills it:
if dt > .2: return Task.cont
My computer was too slow(the fastest was .5 ouch)
What CPU and operating system are you using?
Pentium III (650 MHZ)
ATI Rage Mobility 8 MB
Just out of interest, what fps do you get?
Im not sure of the config file command, I just use…
before the line that says…
A little off topic now…
I thought that recording the highest dt might help the problem with the “loose ball” so Ive taken these results…
1 window @ 250fps with highest recorded dt of .008
2 windows @ 120fps with highest dt of 0.020
3 windows @ 70fps with highest dt of 0.034
4 windows @ 44fps with highest dt of 0.047
5 windows @ 31fps with highest dt of 0.064
All windows @ 800x600 fully showing (except 5 which just dont quite fit)
Now the weird part is the ball starts missing the walls alot from 4 windows onwards.
A couple mins of testing and…
I managed to get the ball leaving in 3 window situations & I think I know where the problem is. When it gets to the stage where you can tilt the board quicker than the collision detection kicks in, then the ball stays in one place and the bounding area gets “moved” through the ball. Now the ball becomes free from its cage. If that makes sense
[I submitted a reply, but it disappeared, so I’m trying again]
I’m a Panda newbie, and I’ve been going through the tutorials myself. I saw the same ball-through-wall bug.
I moved the collision handling code block in rolllTask() up to right after the “dt > .2” time check. That way the collisions are handled before the mouse is checked, and before the ball is moved. This seems to work, so the ball always stays in play. Would this change cause any other problems?
That sounds like the right way to solve this sort of problem. Congratulations!
Congratz at solving it Guest. You really need a name
Ive not really touched Panda for the last 2 weeks - Where does the time go?
BTW: Your post vanished into the Showcase forum