English 中文(简体)
b2 未能适当定位于皇家骑士团?
原标题:b2Body not properly positioned on CCSprite?
最佳回答

CTM_RATIO是什么? 我假定,这只是PTM_RATIO的一种不同价值,在这种情况下,你本可以简单地改变PTM_RATIO的价值。

之所以存在PTM_RATIO,唯一的原因是Box2D使用计量器。 这是因为,Box2D最有价值,从0.1到100.0不等。 因此,将所有职位价值按比例降到这一幅度之内和之后的任何比率都是罚款。 你可以简单地将Box2D职位作为六等职位,或更准确地对待SOS装置:点位置。 然而,这可能导致与Box2D的性能和模拟问题,例如渗透物体等等。 因此,建议不使用PTM_ RATIO。

我最好的猜测是,你完全忽视了改变一个PTM_RATIO与CTM_RATIO的发生,造成错误。 唯一的另一种选择是,你只是错误地计算了你 Box2D的物体的位置或大小,而后者是显示尸体外观的 sp。

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签