jPCT - a 3d engine for Java > Bugs

ArrayIndexOutOfBoundsException when loading 3ds in FPS demo

(1/2) > >>

First of all I have to say that the engine looks awesome!

But there is one little thing.. or big.. i don't know.
I tried running the fps demo and it works perfectly.

Then I wanted to play around with the level. I imported it into 3ds and exported it again. And got the error below. I tried making some very simple geometry and exported and got the same error. Even when I just import/export without touching the model I get the error.
Do I have to use a specific version of 3DS or?  I am using 3D Studio Max 3.1

Best regards


Error message:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3855
        at com.threed.jpct.Object3D.appendToObject(Unknown Source)
        at com.threed.jpct.Object3D.mergeObjects(Unknown Source)
        at JPCTDemo.<init>(Unknown Source)
        at JPCTDemo.main(Unknown Source)

I don't have 3DS at all. All i have are converters from and to 3DS. Seems like the error happens when merging the objects from the 3DS-file into a large one. It would be very helpfull if you could send me such a file of yours, so i can reproduce the problem better.

Edit: Fixed in 0.95

Just tried the new .95 release yesterday.
It works perfectly, thanks a lot!   I just uppercases the texturenames and everything works when exporting from max 3.1..
One question though.. about collision detection. . are there any issues to be aware of?
I created a very simple "level" consisting of a plane, some boxes and the standard tea pot (from max).. the boxes works fine, but I can step inside the teapot. Any ideas how that can be?
I can send the .3ds file to you if you want to look at it.. or are there just some things I should be aware of when constructing levels where collision detection are used.

Are you doing a

--- Code: ---teapot.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
--- End code ---

on the teapot?

I just have the teapot as an object in my "level".. it is merged together with the plane and the boxes.. this is probably the wrong way to do it anyway.. it was just a test of your new release.. the collision works fine on the boxes and  the surrounding torus though.




[0] Message Index

[#] Next page

Go to full version