java - LibGDX Box2d Collision Error -


i'm aware going vague. i'm writing action adventure style game , i'm having random (as in seemingly spontaneous) issue body i'm using character getting caught on nothing. i'm not handling collisions, i'm using built in body touches body causes collision feature. debug renderer indicates there collision when there shouldn't 1 , can't discern why happen. suppose need more familiar libgdx surmise why happen. player stuck on left

i guess @codermusgrove right.
if have flat floor, created out of many boxes, might stuck on edges of them.
thats because in physics simulation, body pushed down gravity. results in collision, usualy pushes body up.
if pushed down in between 2 boxes, collision resolver decides push back, shorter way out of collision.
can read more here.
solutions discussed in link. there few different ways:
- cutting edges: if cut edges of character, collision resolver more decide push character up. tryed solution to, in case slowed down character bit. when cut edges much, character started jumping every time moved onto box.
- using edge-shapes: instead of using boxes, use edges. seems don't stuck on edges often, might allready solve issue.
- use gost vertices: using ghost vertices, can give resolver hint on how resolve colission. ghost vertices used collision response only, won't affect rest of simmulation.
- combining boxes: best solution create 1 big box out of adjacent boxes, if possible. solve problem, there no more edges body stuck.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -