ios - SKNode touching other SKNode recognition -


i'm creating new game project, , requires basic interactions between sprites. wondering how implement skphysicscontact class detect when 2 skspritenodes touch. here skphysicscontact class reference:

https://developer.apple.com/library/ios/documentation/spritekit/reference/skphysicscontact/#//apple_ref/occ/instp/skphysicscontact/contactnormal

i'm not sure how use bodya , bodyb methods detect touches

whenever try use it, can't seem figure out how use class. ideas on how use class detect touches between 2 bodies?

once scene contact delegate, calls didbegincontact, , didendcontact. these methods uses both body , body b tell whats colliding. there decide want happen when collide, example make bodya = nil.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -