About Archive Tag Cloud Translations RSS

You are writing a comment about Touch Detection in Cocos2d iPhone, here is a quick summary:

A quick look at three different approaches for implementing touch detection using the Cocos2d iPhone library. There are a number of snippets here, and I imagine it would be rather confusing to approach without a basic understanding of ObjC and Cocos2d iPhone.


You are responding to this comment written by Will Larson on October 27th 2008, 09:05.

Mostly because I wasn't perfectly clean on the topic myself, this article was slightly incomplete. First, the object to subclass is not CososNode, but instead you must subclass Layer for touch detection.

Second, you need to modify your Layer subclasses init method to have the line isTouchEnabled = YES;. With that you shouldn't have any trouble getting it working. I'll have some complete example code in the next day or two.


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")