ymc-thzi / physicsdebugger Goto Github PK
View Code? Open in Web Editor NEWiOS Sprite Kit PhysicsDebugger
License: MIT License
iOS Sprite Kit PhysicsDebugger
License: MIT License
Again, I've put this as a separate issue to keep things clear:
bodyWithCircleOfRadius produces malloc error, as in the following code for example (and also in the demo project)
//a sprite with a circle physicsBody
SKSpriteNode* ball = [SKSpriteNode spriteNodeWithImageNamed:@"ball"];
ball.name = @"ball";
ball.position = CGPointMake(self.size.width/2,self.size.height-1);
ball.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:ball.size.width/2];
[self addChild:ball];
This is the error:
http://d.pr/i/Lhr7
PhysicsDebugger(52095,0x10214c310) malloc: *** error for object 0x109f52e90: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
The error occurs with 64-bit simulators but not the 32-bit ones - any ideas?
Thanks!
Steve
Following the instructions on the README.md are not completely correct. It is missing the import statement:
I saw the correct step to do on the YMC page, but it would be good to update the git README as well.
I thought I would open a separate issue to keep things clear.
I did some tests and it looks like all nodes must be direct children of the scene to work. So for example the code below will fail.
Is this a bug? Just wondering as Apple's Adventure example actively encourage people to put nodes under layers, and a car would for example have many children nodes.
Steve
SKNode *layer = [[SKNode alloc] init];
[self addChild:layer];
//a sprite with a rectangle physicsBody
SKSpriteNode* box = [SKSpriteNode spriteNodeWithImageNamed:@"mole"];
box.name = @"box";
box.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:CGSizeMake(80, 80)];
box.physicsBody.mass = 0.1;
box.position = CGPointMake(self.size.width/2,self.size.height-10);
[layer addChild:box];
I'm getting the following error which blocks the Pod from working at all -
'Implicit declaration of function 'YMCSwizzler' is invalid in C99'
Am using XCode 5.0.2 on iOS Simulator (iphone Retina 4 inch)
Any ideas?
Steve
The thing that I need most of all is some form of physics debugging for SKPhysicsJoint classes.
Any chance you could add support for them?!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.