Hello, I have a pinball game I've been working on for a couple of weeks. It's running like a dream (with some very helpful advice from these forums). I'm trying to simulate an upper level in the pinball game. Basically a sensor detects the ball is about to enter the access point for the second level then I want the ball to move about the second level until the exit sensor is triggered and the ball is placed back in the lower level.
Plan A : Second level is a caged rail, define the shape in physicseditor and disable it at the start of the game. When the sensor is hit, I wanted to disable the shapes on the lower level, activate the second level, fire the ball around the upper level cage shape then when it hits the exit sensor, disable the level 2 rail and enable the level 1 board. This worked perfectly except all of the flipper fixtures on level 1 flew off to space when I deactivated the level 1 board.
Plan B: Define the level 2 cage rail as a separate shape in physics editor, create a second world and add the level 2 caged rail to it. When the ball in level 1 (world 1) hits the enter rail sensor destroy the ball in world 1, recreate it in world 2, fire it around the level 2 caged rail until it trips the exit rail sensor, destroy the world 2 level 2 ball and recreate it in level 1 etc. This also worked perfectly except a phantom version of the balls is still kicking around the level 1 board despite my research into destroying balls, not destroying them mid render but instead queing their destruction for deletion before next render.. still getting invisible balls roaming the game as you move from caged rail and back to the base board.
I'm happy to post code, let me know what you need to see. This is driving me wonderfully nuts 🙂
Thanks in advance.
Plan A : Second level is a caged rail, define the shape in physicseditor and disable it at the start of the game. When the sensor is hit, I wanted to disable the shapes on the lower level, activate the second level, fire the ball around the upper level cage shape then when it hits the exit sensor, disable the level 2 rail and enable the level 1 board. This worked perfectly except all of the flipper fixtures on level 1 flew off to space when I deactivated the level 1 board.
Plan B: Define the level 2 cage rail as a separate shape in physics editor, create a second world and add the level 2 caged rail to it. When the ball in level 1 (world 1) hits the enter rail sensor destroy the ball in world 1, recreate it in world 2, fire it around the level 2 caged rail until it trips the exit rail sensor, destroy the world 2 level 2 ball and recreate it in level 1 etc. This also worked perfectly except a phantom version of the balls is still kicking around the level 1 board despite my research into destroying balls, not destroying them mid render but instead queing their destruction for deletion before next render.. still getting invisible balls roaming the game as you move from caged rail and back to the base board.
I'm happy to post code, let me know what you need to see. This is driving me wonderfully nuts 🙂
Thanks in advance.