Collision not recognized while interpolating

daaddddaaddd Member Posts: 116
edited May 2014 in Working with GS (Mac)

So i've put an powerup in my game with shrinks the main actor, it interpolates the size , but when the actor collides nothing happens if it is interpolating, any idea guys? thank you

Comments

  • daaddddaaddd Member Posts: 116
    edited May 2014

    i solved the problem by creating an invisible actor that constrains its position to the main actor position, and the collision worked... but it was not the solution i wanted :(

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Anytime you use a constrain attribute or interpolate it overrides collisions. This is because of real physics. To keep collisions in place you need to be controlling velocity not brute forcing an X and Y. Move to, velocity and such keep collisions intact. You can also use this method.

  • daaddddaaddd Member Posts: 116

    thank you @The_Gamesalad_Guru‌ , but would you say that this is a "bug" that will be solved in future releases?

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    I'd say it was normal rather than a bug.

    You can code round it as mentioned above.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited May 2014

    This is not a bug. As I said when you constrain to a touch or brute force an actor to a position you are doing thing outside the physics engine. Collision works as part of the physics so you need to use the methods mentioned as they keep things physics based. You just need more understanding of how things work.

  • daaddddaaddd Member Posts: 116

    @The_Gamesalad_Guru said:
    This is not a bug. As I said when you constrain to a touch or brute force an actor to a position you are doing thing outside the physics engine. Collision works as part of the physics so you need to use the methods mentioned as they keep things physics based. You just need more understanding of how things work.

    sure, all the learning is welcome,thank you, but as you said you can't expect this with position , i did it with size, so it applys anyway?how do i know wich attributes have the same behavior with interpolating? (the position both x and y are constant in this game)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Any behavior in which you control the velocity of an actor. move to, accelerate, move, change velocity. These actions fall inside the physics engine. Think of it this way. These behaviors are like throwing something, that is when you throw a ball you provide force but it leaves your hand and is on it's own with no more force being provided by your hand. When you use a constrain or interpolate you don't throw the ball be carry it to the spot. There is a constant force. When you use constrain or interpolate the actor ignores all physics, collisions, gravity and bounce.

  • daaddddaaddd Member Posts: 116

    @The_Gamesalad_Guru said:
    Any behavior in which you control the velocity of an actor. move to, accelerate, move, change velocity. These actions fall inside the physics engine. Think of it this way. These behaviors are like throwing something, that is when you throw a ball you provide force but it leaves your hand and is on it's own with no more force being provided by your hand. When you use a constrain or interpolate you don't throw the ball be carry it to the spot. There is a constant force. When you use constrain or interpolate the actor ignores all physics, collisions, gravity and bounce.

    thank you!! now i totally get it... make a lot of sense to me , definitely not a bug :smiley:

  • LsampaioiiLsampaioii Member Posts: 6
    edited February 2015

    Hey @daaddd , did you ever find a way around the problem you were having? I'm having a very similar problem with my game.

Sign In or Register to comment.