Hi! I am trying to create a platformer, where the screen is divided in the middle horizontally, and the player is projected on both sides. Tha controls move both "players" (the one in the real world and the one in the mirror world). I have gotten them to move with the same inputs basically like a mirror, but the physics don't really work. When the "real" player is on a platform, the mirror player stays floating (this is goood). But when I want to use a platform in the mirror world, the real player keeps falling and the mirror player is pulled through the platform. I would like help to have them both "float" if the other is on a platform.
#Issue with mirrored player
1 messages · Page 1 of 1 (latest)
What's the code for the player?
It's the one that comes with the CharacterBody2D
So you didn't change it?
I tried using a global script to keep track of values like gravity and position, but I ended up in a worse spot, so I returned to the main one for now
What if you just made the two players part of one characterbody2d
You can add multiple collision shapes to a characterbody2d
Ohhhh interesting idea, but wouldn't they follow the same physics tho? My other character is supposed to mirror so like, gravity would be inverted
Oh okay then we need another solution
Uhhh the two worlds are actually both the same way down but you just flip the mirror world upside down with a shader so it looks like gravity is reversed
I am actually just flipping the sprites 180° from the tile set, and they are all in the same place. It's just my "mirror" character which is flipped and "following" the real one
If you flip the graphics while the mirror level is actually right side up, then you don't have to worry about two different gravities
Alternately, you can just put all the mirror platforms on the non mirror level, but invisible
And the mirror player has no collision and just follows the normal player
Ommmmgg dude
How did it never occurred
I'm so cooked thankssss!
Nah you're fine
Ok so I'll just "solve" this and tell everyone ure smart ok thankss