Jump to content

JBox2d- Ball falling but too fast

- - - - -

  • Please log in to reply
2 replies to this topic

#1
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
I am currently investigating physics engines for my game and am pretty sure I will use JBox2d (although there is only about 2 tutorials for it, i'm sure the C++ tutorials are transferable skills). I have created the world, set up normal earth gravity and created a ball. However my problem is my ball is falling to the bottom of the world in under 1/2 a second. Why is it doing this? My world is from 300 to -300 and the ball is placed at 200(these are all y co-ords as the ball is currently not moving on the x axis). I have not changed any of the mass properties of the ball and it is just getting its mass from the shapes. My timestep is 1 (manually set) and my FPS is currently around 400.

#2
lethalwire

lethalwire

    while(false){ ... }

  • Members
  • PipPipPipPipPipPipPip
  • 748 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP
I've never used JBox2D but fast falling could be due to gravity.

#3
tom19762005

tom19762005

    Newbie

  • Members
  • Pip
  • 1 posts
There is one similar ball falling application which is developed using jBox2D and javaFX 2. You can find tutorial and source code for this application here. Also you can watch application sample demo video here Hope this will help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users