ios - Touch through a node in SpriteKit -
so working on making tower defense game , have tile board working , able place towers... degree.
when player clicks button above grid, toggle on tower placement , allow player place towers on cell within grid. however, each tower getting circle shapenode around handle detection of creep moving firing range. shape node shows fine around tower once place them.
the logic used place towers finds node touch (named "cell") , replaces tower node. if tower node has circle node attached , covering cell next it, unable select cell node below circle.
how go touching "through" circle, or setting fill space nothing can access cells below it?
i'm still learning sprite-kit go, if there may simpler approach feel free point me in right direction too.
without seeing of relevant code it's hard description, think issue shape node. instead of using shape node handle contacts, suggest use tower's physics body instead. can still have circular physics body towers without resorting adding whole new node. removing shape node resolve cross touch interference.
Comments
Post a Comment