A lot of people have problems with ramps including myself. I used to simply use a process of moving the user up 10 units every time they came in contact with the ramp, which is like this idea, except this simplifies it a lot more for use with all objects. Here it is:
Code Test Setup:
- Have 3 or 4 boxes rotated at different angles, 1 or 2 of em should be at perfect angles like 90, 180, 270 or 360.
- Have a character that can move around , could be a simple box
The idea:
- Use a collision check to check when the user collides with any object.
- If the object's X angle is 90, 180, 270 or 360, relocate the user to their old coordinates.
- If the object's angle is anywhere between 0-89, 91-179,181-269,or 271-359, move the object up 10 (or whatever amount you want) units.
Thus, this is a fully functional collision detection method. Ofcourse it wouldn't work for floors because floors are at perfect angles so you wouldnt move.
Anyways its just an idea but I cant get it working, I dont know how to check if the objects angle is equal to the amounts without having to check for EVERY single object. I tried using 0 as an object number but it said invalid object number.
Well, it's in whoever wants to bother with this's hands.
Causin' RUCCUS whereva' I go.