|
Fellow goons.. I probably should be posting this to some specific processing/box2d forum because this is pretty specific problem but I rather try here first because why not. I started programming game prototype to see if an idea I had sometime has any legs. I chose Processing because I haven't programmed anything in nearly ten years so I'm basically at the beginner level. I'm also using Fisica wrapper for box2d. I'm moving a ball (or a circle) body with a rectangle body by using a mouse. Basically pong but you can move the rectangle around freely and the ball has big mass so you can really push it around. I need to be able to pass the rectangle through the circle while pressing a mouse button and I've done this by making the rectangle a sensor when mouse is pressed. All of this works fine but the problem arises when I make the rectangle a sensor WHILE moving the ball. When the collision is happening. It seems that for some reason the now sensor rectangle doesn't pass through the ball until the collision is over. It just keeps pushing the ball even though isSensor() function is telling the rectangle is a sensor and I've given it different color also to tell it's a sensor. I don't know where the problem is or what can be done. Could this be a bug/feature in fisica or box2d? Maybe there is a better way to do this? Maybe I can destroy the body or something? This is is pretty critical function in the game so I have to come up with something.
|
# ? Mar 12, 2017 18:43 |
|
|
# ? May 5, 2024 03:54 |