简体   繁体   English

与Farseer Physics玩耍; 缩放比例让我很困惑

[英]Toying around with Farseer Physics; the scaling is confusing me quite a bit

I've dropped Farseer into my project and quickly started binding some circles to my enemies (this is a top-down) using FixtureFactory.AttachCircle(...) . 我将Farseer放到我的项目中,并快速开始使用FixtureFactory.AttachCircle(...)将一些圈子绑定到我的敌人(这是自上而下的FixtureFactory.AttachCircle(...)

What's weird is I'm using regular pixel values to determine the radius of the circle and it's translating 1:1 into the size represented in Farseer. 奇怪的是,我使用常规像素值确定圆的半径,并将1:1转换为Farseer表示的大小。 For example FixtureFactory.AttachCircle(32, 1f, body) correctly translates into a circle 64 pixels in diameter. 例如FixtureFactory.AttachCircle(32, 1f, body)正确转换为直径64像素的圆。

Why is that? 这是为什么? Everything I've read on Google suggests to never go above 10 (meters) and to devise your own scale. 我在Google上阅读的所有内容都建议不要超过10米(米)并设计自己的音阶。

Am I missing some setting here to define the proportions of my world? 我是否在这里缺少定义我的世界比例的设置?

It seems that the Farseer engine uses MKS units (meters, kilorgrams, seconds). 似乎Farseer引擎使用MKS单位(米,千克,秒)。

This article gives a good example of how to convert this to simulation units. 本文提供了一个很好的示例,说明了如何将其转换为仿真单位。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM