1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GM:S 1.4 Problems in physical collisions: speed rising in collisions.

Discussion in 'Programming' started by Bhreno, Nov 7, 2019 at 10:38 AM.

  1. Bhreno

    Bhreno Member

    Joined:
    Oct 5, 2019
    Posts:
    45
    My obj_ball collides with some obj_blocks and deflects, this is working perfectly.
    However, when the obj_ball gets caught between 2 obj_blocks and collides insistently between them,
    the ball speed goes up during collisions.

    I think it's something related to the value of pixels in meters (0.0625 my default), because whenever
    i change this value I have a different answer about the speed increase of the ball.
    How do I stop this acceleration during collisions?

    For example, if a ball was created with a phy_speed 4, it must remain with phy_speed 4 regardless of collisions.

    In the image, where obj_ball ends up gaining speed:
    The obj_ball is between two blocks, and constantly collides between them, which increases its speed.
    P.s: is physic.





    .
     

    Attached Files:

  2. robproctor83

    robproctor83 Member

    Joined:
    Sep 30, 2019
    Posts:
    49
    Hmm I forget the property off hand but I'm pretty sure physics objects have something to prevent them from losing speed on collisions. Also you might want to look into you walk objects, are they comprised of a bunch of tiny squares or are they long objects that extend the length of multiple tiles? I ask because in my experience if each tile has its own walk then objects that bounce off of them can seemingly hit a corner even if it doesn't look like it's possible. The issue is that when it hits a corner it can deflect things in strange angles which you wouldn't want
     
    Bhreno likes this.
  3. Bhreno

    Bhreno Member

    Joined:
    Oct 5, 2019
    Posts:
    45
    Yes, I just realized that it only speeds up when it hits one of the corners of obj_blocks. What can I do to resolve this issue?
     
  4. Bhreno

    Bhreno Member

    Joined:
    Oct 5, 2019
    Posts:
    45
    and answering your question, there are several 32x32 blocks
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice