Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-09-2010, 12:59 PM   #39 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Quote:
Originally Posted by iPhoneDevelopment View Post
Do you know of any good tutorials or examples of more advanced collision detection? I want to know bascially if my character is above, below, or at either side of the block (so that the block becomes solid, and my character can rest on top of it, but can't travel through it from the bottom or sides).
I don't know any tutorials, sorry. You could google for "writing a platformer" or "collision detection" - I know you'll find a lot of junk mixed in with the good stuff on that second search.

In general, you should be able to check the center point or frame of your character against the locations of the blocks - if you're above the y will be less, if you're below the y will be greater, etc. If you sketch out "good" and "bad" positions on graph paper should shold be able to see what conditions to check - you have all the info you need (width and height of all object, origin an center point of all objects).
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 524
13 members and 511 guests
alexP, blackcat_tq, chemistry, diannjp49, Domele, Eveffey, ilmman, kieshatx65, lzwasyc, nebulabox, nguyenhieu129, Punkjumper, Son of a Beach
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,447
Threads: 94,031
Posts: 402,606
Top Poster: BrianSlick (7,978)
Welcome to our newest member, diannjp49
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:58 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.