Rope problem

Discuss issues specific to the Flash/AS3 port of Box2D
BBman
Posts: 5
Joined: Wed Feb 27, 2013 11:22 am

Rope problem

Postby BBman » Fri Mar 08, 2013 10:20 am

Hello,
Iv'e created a rope using links and revolute joints between them.
I attached a weight body to the last link, and made the body move.
when it gets to a certains speed, it throws an error. (null object reference)...
I assume that it is caused because the rope gets broken in this speed, but I cant figure out how to overcome it or to make the rope stronger, but yet elastic.

thanks!

BBman
Posts: 5
Joined: Wed Feb 27, 2013 11:22 am

Re: Rope problem

Postby BBman » Sat Mar 09, 2013 7:36 am

Someone please?

Ill try to explain better.

I have a chain of rectangles, attached together with revolute joint.
the first link is attached to a static object in the stage, and the last link is attached to a dynamic body (another rectangle shape with a tiny mass).
then I apply a force on the attached body, so it makes the whole rope move.
when I increase the force to a certain amount, flash builder stops running and throws this:

typeerror: error #1009: Cannot access a property or method of a null object reference


how can I overcome that?
Im already two days on that one, any suggestion would be great...

jayther
Posts: 266
Joined: Sun Oct 25, 2009 3:28 am
Contact:

Re: Rope problem

Postby jayther » Sat Mar 09, 2013 4:31 pm

What are the densities of the rectangles in the chain and the dynamic body at the end? I try to use density values of between 0.5 - 5.0 because that seems to be the optimal densities for my shapes whenever I use Box2D.

Erin Catto suggested this for ropes with heavy stuff (or a lot of force) at the end: viewtopic.php?f=3&t=9102

BBman
Posts: 5
Joined: Wed Feb 27, 2013 11:22 am

Re: Rope problem

Postby BBman » Mon Mar 11, 2013 6:23 am

Thanks man but it still throws an error whenever the chain gets to some speed while swnging...any suggestion???

jayther
Posts: 266
Joined: Sun Oct 25, 2009 3:28 am
Contact:

Re: Rope problem

Postby jayther » Tue Mar 12, 2013 10:30 pm

I think showing some code might help.

Is the chain swinging around and around a certain point? Does it go pretty fast before it starts to throw errors?


Return to “Flash”



Who is online

Users browsing this forum: No registered users and 2 guests