Aug 25, 2009 at 10:15 PM
Edited Aug 25, 2009 at 10:27 PM
I've got a problem that I'm not sure how to go about solving. Below is 3 images i'll use as reference to describe what i'm trying to achieve. I would like to make my character follow the angle of the ground below it. in image one you see my character which
contains 2 geoms and one body. The purple geom is the collision geom that keeps the character from falling through the ground and the green geom is my non-collision geom that detects if the character is on the ground or airborne (makes deciding which sprites
to use more stable). when the character is moving left to right he is always upright. In image 2 shows what im trying to achieve. I'm trying to get the character to angle with the floor he's standing on. Now im not sure how to go about this but take note that
the ground could be seperated into multiple geoms. Image 3 shows the complexity im hoping to achieve so that it appears as if the character is walking up a half pipe and angels acordinginly.
If you don't see the below image here is the link:
possible solution that i thought of but might not be very efficient is calculate the degree of every collision point on the green geom and use the medium.
please let me know if im being unclear about my question.. thank you.