Breakout: Fluid Physics on Ball Launch?

0 favourites
  • 5 posts
From the Asset Store
Breakout Bliss design For programming and publishing to other platforms
  • Heya!

    I can't seem to get a stable thrust with the 'Physics Behavior' when I launch the ball. The ball's force is too strong.

    Capx

    I tried the game with the 'Bullet' Behavior but it was just too slow and less bouncy, not as fluid as using the 'Physics' behavior. Slower Breakout Game Demo

    I did manage to launch the ball by using the Touch behavior but the ball launches too fast.

    To set the force at a reduced speed I tried:

    System: Every Tick > Ball > Apply Physics: Force 1, at angle 270? (up direction)

    ...But no luck. Any ideas?

    Thanks!

    -AleX

  • You can play around with X,Y velocity ...

    Or you could do this ...

    Set Gravity to 0

    And apply 1x (one) Impulse

    It should always keep the object at the same speed because there's no gravity

    Cheers !

  • Thanks Whiteclaws!

    So I have set the World's Gravity to Zero. That has made the Ball stand still which is good.

    Iv added 'Impulse Towards Position' to the Ball so it will increase the speed every time it ricochets off an object. (My understanding of Impluse)

    DEMO

    <img src="https://dl.dropboxusercontent.com/u/20299415/capx-forum/Pictures/Physics-Pics/Ball-Impulse-Towards-Angle.png" border="0">

    dl.dropboxusercontent.com/u/20299415/capx-forum/Pictures/Physics-Pics/Ball-Impulse-Towards-Angle.png

    BUT

    The ball seems to decrease in speed overtime, even though the ball is rebounding off objects which should increase the speed.

    What do you think the problem is?

    I think it might be to do with the Touch controls as the force is based on the click or touch of the player.

    Capx

    Cheers!

    -AleX

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's the elasticity , try and set the object that collide with the player and the player's elasticity to a high value

    Edit : Yep , Fixed it , Also , In the ball's physic behavior's settings

    Set Prevent Rotation to Yes

    Cheers !

  • Thanks Whiteclaws!

    I hit the elasticity up from 0.8 to 1.

    I then increased the Ball's Impulse to 1100.

    Seems to do the trick! I think I was over thinking, simplicity is the key!

    Now I'm going to add a one-click only Ball launch. Maybe an Instance, Boolean variable will do the trick!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)