Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 06:55:00 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)2D Collision Detection for Slopes.
Pages: [1]
Print
Author Topic: 2D Collision Detection for Slopes.  (Read 859 times)
Katsusiro_7
Guest
« on: July 16, 2015, 03:14:28 AM »

Hi there!

I need some help with 2D collision detection raycast techniques. Is there any material on implementing the most reliable and definite technique for processing slopes? I`ve read many articles on the topic, but all of them did not consider different exceptions, like standing on the peak.

Also, I would like to avoid Unity physics as much as possible, but, anyway, will consider mixed techniques, too!
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #1 on: July 16, 2015, 06:51:12 AM »

The most reliable way that I know of is to make a math function out of the slope and the ray you want to cast, then solve the equation.
Logged
Katsusiro_7
Guest
« Reply #2 on: July 24, 2015, 07:04:19 AM »


Thank you for the answer!
It seems like a solution to my problem. I assume, that I can make a line function out of my slope by two intersection points of two raycasts.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic