开发者

AndEngine physics joint

开发者 https://www.devze.com 2023-02-27 04:40 出处:网络
I use AndEngine for Android, when i create a scene i place there two physics objects, and i want them to be alway开发者_StackOverflow中文版s at the same distance when they are moving.

I use AndEngine for Android,

when i create a scene i place there two physics objects, and i want them to be alway开发者_StackOverflow中文版s at the same distance when they are moving.

I tried to use DistanceJoint, but i cant understand how to set length of it. This length is not in pixels... I want to set: distancejoint.length = "distance between objects in scene initialization".


Every value (especially positions) needs to be divided by: PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT.

0

精彩评论

暂无评论...
验证码 换一张
取 消