Bouncing Ball

siyal343siyal343 Posts: 4Member

So, i want a ball(2D sprite) to bounce constantly. I have tried with Rigidbody2D but after every bounce its height increase and i don't want this increased height(bounce up to a constant height). I just want to make the replica of bubble struggle type game.

Answers

  • memermemer Posts: 36Member

    If you don't need the balls to collide with each other, I would use KinematicBody2Ds and program the movement directly, since it looks like you want precise control over the ball movement.

  • siyal343siyal343 Posts: 4Member

    @memer said:
    If you don't need the balls to collide with each other, I would use KinematicBody2Ds and program the movement directly, since it looks like you want precise control over the ball movement.

    @memer said:
    If you don't need the balls to collide with each other, I would use KinematicBody2Ds and program the movement directly, since it looks like you want precise control over the ball movement.

    collision is not the problem......every type it bounces its bounce height gets increased and i don't want that

  • memermemer Posts: 36Member

    I never said that collision is the problem.

  • BishopBishop Posts: 186Member

    @memer That answer won't help him if you don't or can't help, then it would be better to write nothing...here helps community each other and these comments are completely useless without help.
    I'm not a programmer but maybe some try with gravity vector? or Rigid body axis lock,set axis velocity?

  • AvencherusAvencherus Posts: 49Member

    memer is correct.

    It's not going to be easy or reliable to try to get that precise result by fiddling with the settings of the default built in integration. If you're not concerned with contact/collision information that comes with using a RigidBody, the most straight forward route is to use a KinematicBody and write custom equations to handle the desired velocities.

    If you're sticking with RigidBody I would recommend turning on custom integration and overriding the _integrate_forces() method to write your own integration.

Sign In or Register to comment.