I am new to Unity and this is just an idea. For what I know, unity collision detector is already built in Unity. In flash u could, based on what part of the hero was touching the ground, change it’s rotation. Is there any chance that I can detect collisions for the hero as a whole and detect colisions, in only an area of this hero?
For instance if his left foot was touching the ground and the right foot wasn’t, he would rotate clockwise until both feets were touching terrain.
Thank you for any resposes
Sure, it’s possible. It’s not anything that will be done automagically, you need to write code to make that happen. You can use Collision.contacts to get the normal and figure out what to do with that once you have it.
If “feet touching the ground” is what you are going for, there may be a shortcut- it’s quite old, and I haven’t messed with it in a while, but there is a Locomotion System package that you could use for a starting point and modify to work in 2D that will look much better than whatever you painstakingly hack together from contactpoint information.
if u put your own colliders, for example something like hitboxes, thenyes technically it should be possible. It could be something along the lines of “if left foot is touching something with this tag (terrain for example)”, rotate around this axis".