Collision not recognized while interpolating
daaddd
Member Posts: 116
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
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
thank you @The_Gamesalad_Guru , but would you say that this is a "bug" that will be solved in future releases?
I'd say it was normal rather than a bug.
You can code round it as mentioned above.
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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)
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
thank you!! now i totally get it... make a lot of sense to me , definitely not a bug
Hey @daaddd , did you ever find a way around the problem you were having? I'm having a very similar problem with my game.