RangeError: Error #1125: index out of range.

Software: Away3D 4.x

liuyi, Member
Posted: 12 December 2011 08:41 AM   Total Posts: 65

1. we created terrain shape by AWPBvhTriangleMeshShape.
2. car speed very faster.
3.

when game run a while, the error maybe happen.

Can you help us to fixed that? and

save our life, thanks!

 

   

liuyi, Member
Posted: 12 December 2011 08:41 AM   Total Posts: 65   [ # 1 ]

I want to paste more code, but I got errors when submit the post.

 

   

Yang Li, Administrator
Posted: 13 December 2011 02:29 PM   Total Posts: 80   [ # 2 ]

can you paste all error messages, did you recompiled the awayPhysics.swc yourself?

 

   

liuyi, Member
Posted: 16 December 2011 10:28 AM   Total Posts: 65   [ # 3 ]

Thanks for your reply.
I didn’t modified away3d and AwayPhysics code.
(My AwayPhysics is not the latest, it stay at c199ccaf6fa8193f3becb3cd2d4f2af571e9bc5f comment is: fixed set mass bug

 

   

R Villani, Newbie
Posted: 06 February 2012 11:02 AM   Total Posts: 13   [ # 4 ]

I’m getting this error too. It’s a skate game and it crashes randomly when the skate speed is high and it collides with something.
For the matter, I’m using AWPCompoundShape for the skate. I don’t know if it has something to do.

Also I get an error undefined every time I use removeRigidBody(). It’s not instantly, but after a while when the skate collides again with another mesh.

That’s something very bad about using alchemy: we can’t understand and solve the erros that come from Bullet!!

When the problem is in Away3D itself it’s ok, because you can track the error all the way to the source. But with awayphysics that’s impossible!!

 

   

Yang Li, Administrator
Posted: 06 February 2012 12:03 PM   Total Posts: 80   [ # 5 ]

Do you have a very large static scene use AWPBvhTriangleMeshShape? if so you can try to divide it to several shape, or set phsyicsWorld.scaling to a larger value like 500.

 

   

R Villani, Newbie
Posted: 06 February 2012 12:16 PM   Total Posts: 13   [ # 6 ]

No. It’s not that big. My scene consists of:
- 20 copyes of a street object that I move according to the position of the skate to fake an infinite street;
- some obstacles that the skate can pass trough (if just a powerup or so) or a ramp it can climb up to.
- the skate.
- the camera.

The ramp is the only object that uses AWPBvhTriangleMeshShape because of it’s triangular format. But it’s very small.
And now that you mensioned, I think the problem normally occurs when the ramp is hit!

But if you mean about distance of things from origin, yes, it’s big!
Because the skate doesn’t stop until the player hits a ‘deadly’ obstacle. While it’s moving, it keeps going on z positive. So it’s coordinates together with the street and obstacles may go to infinite z.

I don’t like it very much the solution of scaling the world. Wouldn’t it change the behaviours of things like gravity?

I tryed to do it with the skate simply stopped and the streets looping below it with the objects. But to update the rigidBodies positions to follow the objects every frame, made me loose 30fps (I’m using 60).
And besides, the skate traveled through the ramp instead of climbing it up. If it’s the skate that goes to it, it works correctly. Very strange behaviour.

 

   

R Villani, Newbie
Posted: 06 February 2012 12:33 PM   Total Posts: 13   [ # 7 ]

Made more and more tests.
I got rid of errors without calling removeRigidBody().

But the problem is that as obstacles are created, the fps keeps droping, until the game is not playable at all.

Ain’t there any method to do something like dispose() to rigid bodies?
I’m already putting them at y = -10000 (away from the streets) and calling forceActivationState(AWPCollisionObject.DISABLE_SIMULATION).

 

   

Yang Li, Administrator
Posted: 06 February 2012 01:59 PM   Total Posts: 80   [ # 8 ]

Is it possible to send your code to me? I can debug it, maybe can find out what cause the error.

 

   

R Villani, Newbie
Posted: 08 February 2012 02:50 AM   Total Posts: 13   [ # 9 ]

Sorry to take so long to answer, Li.

I was looking for the possibility, but it’s a job and my client said I can’t send it to you. It’s a shame.

But try something like this: create a AWPStaticPlaneShape or a huge box to be a floor. Get a ball on it and make it accelerate in Z constantly, so it can go far and achieve a great speed. Put some objects on the floor as obstacles and use removeRigidBody as the ball get past them. This should throw an error when the ball hit something after another thing has been removed from the physics world.

And what about dispose? Is there something like it?

Thanks for the answers till now!

 

   

synkarius, Member
Posted: 26 April 2012 03:02 AM   Total Posts: 64   [ # 10 ]

I too would like to know if there’s a standard way or a best way to dispose of rigidbodies in AwayPhysics.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X