Hello everyone,
is there anyway to make a 2d object move in the Z axe using rigidbody2d ? (i don’t want to use transform)
Edit:
i want to use rigidbody2d instead of the classic one is because i need to use circleCollider2D and polygonCollider
btw, what am trying to do is something like this

the blue circle is the player, it is suppose to be controlled with the mobile device accelerometer and i already done that, now what i need is to simply check if the blue circle is standing on top of one of the gray platform circles and if not it should fall and it’s game over. So far the only solution that i could think of is to flip everything including the camera, make the player fall within the Y axis, and make it move with Transform.translate by assigning the Y value of the accelerometer to the Z axis of the transform position, but i thought maybe there is a simpler way to do that. of course 3D is not an option unless there is a way to create colliders like polygon and edge colliders does.
Thank you
my problem is how to detect the "out of bound" and not the falling illusion (i think i'll just make it explode when its outside the platform) thanks
– AladineMake triggers. And use the following of course, change it to suit your needs void OnTriggerEnter2D(Collider2D col) { if(col.gameObject.tag == "your death area tag") { // shrink the player to give the illusion of falling // delay // restart } } DISCLAIMER: Not tested
– AcE_fLoOdEri thought about that too, but how can i make the colliders of the death area ? i thought about create an edge collider around the platform circles but as you can see when two circles are next to each other like that, the player will be forced to die even when it shouldn't, so in this case the only thing that could work is to create some sort of door between the two circles but am still looking for a simpler solution
– Aladinealso i want the player to be effected by what's happening with the platforms, for example if the platform is moving, the player should move alone with it, parenting can fix this but i'd rather use physics to do it
– Aladine