BetterCharacterControl issue

Hi!
I noticed that BetterCharacterControl triggers a NullPointerException when trying to remove it from PhysicsSpace. It would seem that AbstractPhysicsControl expects different behaviour than provided by the BetterCharacterControl. It’s almost a month since this issue was reported and is still happening in nightlies. Could somebody with a understanding of the jME physics system take look? As it makes the control pretty much unusable in other than the simplest projects.

It would seem there is even an issue reported: http://code.google.com/p/jmonkeyengine/issues/detail?id=586

Sorry for being so upfront about this request, but I guess it is a big issue.

For now I’m using this instead of BetterCharacterControl:
[java]public class FixedCharacterControl extends BetterCharacterControl
{
public FixedCharacterControl(float radius, float height, float mass)
{
super(radius, height, mass);
}

@Override
public void setPhysicsSpace(PhysicsSpace space)
{
	if(space == null && this.space != null)
		removePhysics(this.space);
	else
		super.setPhysicsSpace(space);
}

}[/java]

It seems to be working but I’m not 100% sure it properly cleans stuff up.

1 Like

You are using an unreleased nightly version of the software and complain about things that are not being fixed, just to put some things straight here.

To put things straight, I’m simply asking for support. And telling me “Yeah we’re working on it.” / “We’re dumping BetterCharacterControl” / “Your fix is fine.” / “Your fix is crap.” etc. is a perfectly fine response.

I didn’t want to seem demanding (or complaining in that case), but I’ve seen other people hitting the same wall for some time and I simply got worried. I don’t think there’s anything wrong with that, now is it?

I would have to look into it to be able to tell you. Also it seems you already have lots of information no?

Don’t worry, @normen can be grumpy at times :slight_smile:

@normen: I don’t think that @yezu was trying to say bad things.

As I said, I just intended to put this straight. It seemed like the OP wasn’t aware of the fact that there is a stable for projects where a minimum of bugs and a maximum of stability is required. At any instance the flow of AbstractPhysicsControl is the reason from what I see but it has a few other shortcomings and I have to test this properly to clean this up. BetterCharacter also should get some additional features and changes before the next stable (like the jumping over edges issue and a variable jump control and debounce).

I’m aware of the stable. However there are so many exciting things in the nightlies that I stopped using it a long time ago. In retrospect my question might have seem awkward, after all nobody’s making any promises about nightlies. However as I said all I was hoping for was some communication about the issue.

Anyway thank you for the response. I guess I will stick to my fix for now and just keep monitoring the progress :slight_smile:

So I fixed the flow in AbstractPhysicsControl but didn’t look into BetterCharacter yet. It should solve the remove problem though afaics.

2 Likes

Great! I just managed to test it.

Thanks a lot :slight_smile:

1 Like