sprite kit - How to set different gravities for different Spritenodes in Swift? -
i have 2 different skspritenodes in scene. 1 node spaceship affected tilting of device. second node rock should falling down regardless of how device tilted. have created both of these nodes separately (in separate projects) , work fine. however, when try put them in 1 project, rock/asteroid starts being affected tilting of device rather falling down. how can make asteroid fall down while still keeping spaceship affected tilt of device?
you may want read on skfieldnode (https://developer.apple.com/documentation/spritekit/skfieldnode). can create new gravity nodes and, using category bt masks, have nodes affect physics bodies specify.
Comments
Post a Comment