events - Why does collision work properly for convex polygon based physicsBody but touchesMoved doesn't -


i setup sksprite (s1) have physicsbody polygon path:

s1.physicsbody = [skphysicsbody bodywithpolygonfrompath:path]; 

and other 1 (s2) has physicsbody generated surrounding rectangle:

s2.physicsbody = [skphysicsbody bodywithrectangleofsize:e.size]; 

and collisions of 2 sprites fine, happen when actual pixels s1's polygon path , surrounding rectangle s2 collide (and not surrounding rectangles each of sprites). fine. touchesmoved in s1 - has polygon based body - occurs when surrounding rectangle touched - though has polygon based physicsbody (see above code setting physicsbody of s1). how can solve problem , have event fire when should, when actual pixels (defined polygon based physicsbody) touched?

i tried detecting body @ point:

skphysicsbody * draggedoverbody = [self.physicsworld bodyatpoint:location];  draggedovernode = draggedoverbody.node; 

and detects bounding rectangle instead of polkygon physicsbody. frustrating.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -