The Gaming Universe
*
Gaming Universe > Forum > Projects > Open Zelda > OZ Help > AngleCollide


Pages: [1] Go Down
July 29, 2010, 01:26:44 PM

KingOfHumans
KingOfHumans
Moderator
*
Open Zelda - Lead Scripter

Posts: 20,040 (Per Day: 7.439)
Joined: Apr 2003
Location:
Local Time: 06:51:22 AM
Member ID: 421KingOfHumans has been here for 7 years.
 Submarines Squid Hunter Target Shoot Triathalon Spacehunter Smacktherabbit Topbanana
AngleCollide
I've been working on a new tutorial here and there and just thought I should post the part of my tutorial that talks about AngleCollide. This function confused me personally for quite a while, and others as well. So here's a quote from my tutorial that should help you guys out. I also fixed up the wiki a bit for this function as some of the information was wrong.


Quote from: QD Tutorial
So take a look at "if(!AngleCollide("this",5,5, 204, false, width / 2, height / 2))". Imagine yourself in the center of a circle (width / 2 and height / 2 is where you start). The first 5 is the distance, so that means you can take five steps. The second 5 is the amount of different directions you can go. If there's some object with a mask value of 204 or lower you can not go any further. Pretend you can fly so your not afraid to go over holes (this is what the false is for) so you pass right over it. So if there's nothing solid in your way it will return true, otherwise false. Get it now?

__________________
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.
[Night Time]
KingOfHumans is Offline Click Here to See the Profile forKingOfHumans Visit KingOfHumans's homepage! Find more posts by KingOfHumans

July 30, 2010, 06:42:41 AM

Khatuni

Scholar
**

Posts: 754 (Per Day: 0.743)
Joined: Nov 2007
Location: Leiden
Local Time: 12:51:22 PM
Member ID: 12075Khatuni has been here for 2 years.
 TennisSte Pingpong Cat Memory Quix CH Plasmanautv2 Militarywar
AngleCollide
Nice, that must clear it up for a lot of people.
Is the holes function still going to be hardcoded in OZ7?

[Fatality]
Khatuni is Offline Click Here to See the Profile forKhatuni Find more posts by Khatuni
Pages: [1] Go Up
Print Print
:
:




Articles
ShoutBox!
Last 5 Shouts:
September 06, 2010, 09:21:08 AM
o.o
September 06, 2010, 12:39:27 AM
Chat Service is down, down, down!
September 01, 2010, 09:32:31 AM
*pulls out his....sword...
August 31, 2010, 01:43:30 PM
I'll show you pointlessness! *pulls out a pointless sword* Fear my pointlessness!! Tongue
August 31, 2010, 12:36:13 PM
Nah, the next one is completely pointless. cool
Recent
[Yesterday at 10:19:02 PM]

[Yesterday at 05:15:14 PM]

[Yesterday at 01:11:19 AM]

[September 08, 2010, 03:18:58 PM]

[September 07, 2010, 12:28:39 PM]

[September 07, 2010, 11:30:22 AM]

[September 07, 2010, 03:21:13 AM]

by Zeo
[September 06, 2010, 08:37:53 PM]

[September 06, 2010, 07:21:58 PM]

[September 06, 2010, 02:45:29 PM]
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.521 seconds with 37 queries.