Original Post
i am trying to figure something about collision detection in 3D. the setting is a platform game,and i want to detect collision with a platform when the player jumps. now as far as i knew it was just shooting a ray from the player,with the direction of the player's velocity and checking if it hits any of the platform's triangles. but i can see a problem that i will present through this image which was painted with my horribly amazing MS paint skills
as you can see,the happy character wants to reach the platform,so he jumps toward it,and shoots a ray from his belly toward the platform. but oh no! the ray misses and yet half of the character's body will pass through the platform. i thought of perhaps shooting 5 rays(first on the top of the character,second in the middle,third in the bottom,forth in the right side of the character and fifth in the left side of the character) but that just sounds expansive(not to mention this problem could still occur with small platforms). so,how do i handle this like a pro?
as you can see,the happy character wants to reach the platform,so he jumps toward it,and shoots a ray from his belly toward the platform. but oh no! the ray misses and yet half of the character's body will pass through the platform. i thought of perhaps shooting 5 rays(first on the top of the character,second in the middle,third in the bottom,forth in the right side of the character and fifth in the left side of the character) but that just sounds expansive(not to mention this problem could still occur with small platforms). so,how do i handle this like a pro?