简体   繁体   English

andengine多边形主体和box2d碰撞

[英]andengine polygon body and box2d collision

I recently changed my bodies from rectangle to polygons and got a weird bug and I can't figure it out why its happening. 我最近将我的身体从矩形更改为多边形,并遇到了一个奇怪的错误,但我不知道为什么会发生。 When my "player" body touch another body - with a negative angle he just stack on it. 当我的“玩家”身体碰到另一个身体时,他正以负角度堆叠。

My player X velocity is always constant 5 我的玩家X速度始终恒定5

when I'm switching the body back to rectangle it working fine 当我将主体切换回矩形时,它工作正常

在此处输入图片说明

Does any one fimiliar with this bug? 有任何人对此错误有看法吗? or have any idea what can cause it? 或有什么原因会导致它?

Found a bug in andengine: 在andengine中发现一个错误:

When I put 3 point in the same button line this will cause the bug I write above: 当我将3点放在同一按钮行中时,这将导致我在上面编写的错误:

To fix that you need to make sure that on evry line on the poligon there are only 2 points! 要解决此问题,您需要确保在poligon的evry行上只有2点!

Works fine now :) 现在工作正常:)

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

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