Different Speed on Android

Hi,
I want a very simple Walking Character just dont walk through walls, and goes up and down with the ground(Landscape)
and go up stairs.

no jumping or other things,

I thought the simplest way was to use bulletAppstate, but I dont know if that is also the best solution, (Maybe its to expensive in time for Android)
But if i use it , there comes a problem:
if i use setWalkDirection(moveVec); on my smarphone the char moves much faster than on the pc(moveVec is multiplied with tpf)
i guess that with bigger tpf the move Vector has more power and the character climbs the mountains much faster or something like that
is there a way to have the same speed on different devices?

or tell me if i should use an alternative way to detect walls and ground. Maybe detect the ground with ray casting and only use rigidbodyControl for walls?

Something is here?
http://hub.jmonkeyengine.org/forum/topic/using-applyforce-with-bullet-on-android/

You probably have such a low FPS that 4 substeps don’t cut. Look at physicsSpace.maxSubSteps()

@normen said: You probably have such a low FPS that 4 substeps don't cut. Look at physicsSpace.maxSubSteps()

Android has 33fps (on my device). The Bullet has 60fps by default. That is the problem i guess.

Are you sure that maxSubSteps will help? Possibly, he need to change Accuracy?

@mifth said: Android has 33fps (on my device). The Bullet has 60fps by default. That is the problem i guess.

Are you sure that maxSubSteps will help? Possibly, he need to change Accuracy?

maxSubSteps gives the maximum amount of physics update iterations in one frame, accuracy changes the accuracy of the physics and theres no need to change it if theres no performance issues. It has nothing to do with the visual “frame rate”.

@normen said: maxSubSteps gives the maximum amount of physics update iterations in one frame, accuracy changes the accuracy of the physics and theres no need to change it if theres no performance issues. It has nothing to do with the visual "frame rate".

Aha. Cool. You mean if i set this it will solve the issue:
[java]
bulletAppState.getPhysicsSpace().setMaxSubSteps(1); // or possibly 2
[/java]

Another question according to Android. Is this useful for mobile devices?
[java]bulletAppState.setThreadingType(BulletAppState.ThreadingType.PARALLEL);[/java]
As default is SEQUENTIAL.

Thank you.

@mifth said: Aha. Cool. You mean if i set this it will solve the issue: [java] bulletAppState.getPhysicsSpace().setMaxSubSteps(1); // or possibly 2 [/java]

Another question according to Android. Is this useful for mobile devices?
[java]bulletAppState.setThreadingType(BulletAppState.ThreadingType.PARALLEL);[/java]
As default is SEQUENTIAL.

Thank you.

  1. No, that will make anything below 60fps “slow”, you have to up this to counter-act lower framerates, default is 4, please read the javadoc
  2. It depends, with most current hardware it should yield a performance plus but you might get other issues and run into bugs sooner.