minimum velocity of a ball

SANDEEP410SANDEEP410 Member Posts: 46
edited July 2012 in Working with GS (Mac)
My ball seems to loose velocity after collision even though i have set friction to zero.Anyway how to make velocity of the ball not a fall below a threshold value.

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    When self.Motion.Linear Velocity.X < 30 --> Constrain attribute self.Motion.Linear Velocity.X to 30.

    Or...

    Constrain attribute self.Motion.Linear Velocity.X to max(30,self.Motion.Linear Velocity.X)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MotherHooseMotherHoose Member Posts: 2,456
    edited July 2012
    @SANDEEP410 … a collision changes other things than just direction
    including velocity … when you do not want the velocity to change

    on ballActor:
    change Physics:
    … Friction to 0 and Density to 0

    that should keep the ball from slowing down

    image MH
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Good point, @MotherHoose. Drag to 0 also, although it probably already is.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SANDEEP410SANDEEP410 Member Posts: 46
    When self.Motion.Linear Velocity.X < 30 --> Constrain attribute self.Motion.Linear Velocity.X to 30.

    Or...

    Constrain attribute self.Motion.Linear Velocity.X to max(30,self.Motion.Linear Velocity.X)
    If i use this then my ball keeps on moving towards right of screen
    Well i cant make density to zero bec my ball has to collide with other objects and i need those objects to react physics accordingly
  • SANDEEP410SANDEEP410 Member Posts: 46
    bump
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Please post a link to your project file so that I can see what you're trying to do and how it's not working.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.