0
使用AndEngine物理Box2D我試圖在x軸上將身體從一側拖拉到另一側。如何拖拽使用AndEngine Box2D擴展的身體
這是我迄今其心不是工作正常,身體在y軸上向上移動並且它不遵循指針(手指)
int P2M = 32;
final Vector2 v2 = Vector2Pool.obtain(x/P2M, this.getY()/P2M);
body.setTransform(v2, 0); // if you want you can also set the rotation here
Vector2Pool.recycle(v2);
任何人都熟悉這樣做呢?
你怎麼得到x?你的這個東西是什麼? – Greg 2012-01-14 12:49:37
使用b2MouseJoint。它的設計是用鼠標/手指移動物體 – Andrew 2012-01-14 15:21:56