# SKSpriteNode Touch on non transparent area

**URL:** <https://forums.kodeco.com/t/skspritenode-touch-on-non-transparent-area/37132>\
**Category:** Sprite Kit\
**Created:** [November 29, 2017, 10:14am UTC](https://forums.kodeco.com/t/skspritenode-touch-on-non-transparent-area/37132 "2017-11-29T10:14:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josepm](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@josepm](https://forums.kodeco.com/u/josepm)\
**Post date:** [November 29, 2017, 10:14am UTC](https://forums.kodeco.com/t/skspritenode-touch-on-non-transparent-area/37132/1 "2017-11-29T10:14:02Z")

</div>

Hi,

I have a problem that don’t found solution, I search and read a lot of post but nothing work.  
I have some SKSpriteNode with transparent area and I need detect the touch only on the non transparent area.

With…

> ```
> if let touchedBody:SKPhysicsBody = self.physicsWorld.body(at: pos) {   
> if let theSprite:SKSpriteNode = touchedBody.node as? SKSpriteNode {
> print(theSprite)
> }
> }
> 
> ```

Only work the last one SKSpriteNode and only at some locations inside the non transparent sprite.

With…

> ```
> for node in nodes(at: pos) {
> if (node.name != "gameboard"){    
> print("Node position \(node.position) name \(node.name)") 
> } 
> }
> 
> ```

I get all the nodes at location, but only is valid the non transparent.  
I try to get the alpha value of the texture but I’m blocked… ☹

Any other way to solve this? What I’m doing wrong?

![imagen](https://assets.chunter.kodeco.com/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [May 15, 2018, 2:14am UTC](https://forums.kodeco.com/t/skspritenode-touch-on-non-transparent-area/37132/2 "2018-05-15T02:14:03Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
