Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 raycasting
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
metachief




PostPosted: Sat Sep 27, 2008 10:55 pm   Post subject: raycasting

How do I detect the points in the following picture without using what dot colour. The grid is made of 10x10 squares and I need to detect the points on the sides of the squares that the line touches. This is for my 2D Raycater.


New Bitmap Image.bmp
 Description:
The blue circle is supposed to be the player and the bright-blue line is the ray. The red points is where I would like to detect collision.
 Filesize:  29.35 KB
 Viewed:  53 Time(s)

New Bitmap Image.bmp


Sponsor
Sponsor
Sponsor
sponsor
gitoxa




PostPosted: Sat Sep 27, 2008 11:18 pm   Post subject: RE:raycasting

Wouldn't math be more accurate?
metachief




PostPosted: Sat Sep 27, 2008 11:22 pm   Post subject: RE:raycasting

Thats what meant...as I said I dont whant to use what dot color, instead I need help on how to figure it out with math.
SNIPERDUDE




PostPosted: Sun Sep 28, 2008 7:49 am   Post subject: RE:raycasting

http://www.permadi.com/tutorial/raycast/
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: