I’m making a 2D platformer and I want to have some enemies dropping down from the ceiling.
I’ve made it so that an enemy is sitting upside down at the roof, casting a ray down to the ground and dropping (by adding gravity) when the player is right below it, which is all good, but I also want the enemy to rotate exactly 180 degrees smoothly and land on his feet.
I’ve tried experimenting with different float values to make the enemy rotate 180 degrees, and although it works sometimes, it’s never very precise. It needs to be exact.
Oh yeah. I’m using a Rigidbody2D component for the enemy to be able to jump and chase the player once he’s landed.
Would be very thankful if somebody had the answer for this. Thanks a bunch for reading.