Collision in Sloped Tiles (Tile based games)
Hello my friends...
This my first post (Sorry, my english vocabulary is little, I'm from Brazil)!
Let's go problem...
i'm building a mobile game style Sonyc (Sega), i implement all collision with simple tiles, actors and agents of my game...
But i have problem with test collision with sloped tiles...
My question is simple:
How do i make my hero walk on the sloped tiles ?
Thank very much of your times expense with me!
Regards everybody...
Harlley
Is your game 3D or 2D.
If it is 2D and you want some height difference you can have your tiles have status flags. So lets say your file as a byte slope. maybe you only care about up, down, left and right. So maybe 0 = no slope, 1 = slope up, 2 is slope right etc.
If you are trying for 3D something similar should help or you could calculate the normal of the plane or something. I am not as well versed in 3D programming.
Hope this helps,
James Vaughan
Hi.
In our game programming class our teacher gave us this link
http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm
The pseudo code is in c++ but it shouldn't be that hard to convert to java code.
i haven't tried it myself but you could read through the article and i hope you get something out of it.
jzs-a at 2007-7-13 18:30:56 >
