Hello,
I am stuck with a problem and unfortunately I was not able to find any similar problems or solutions
what I’m trying to do is assigning a custom shape to the feet of the character so when the character collides with other static objects (like trees etc), the output will be more realistic
example:
attached static.jpg -> as the character is a rectangular shape, the head of the skeleton stops when intersect with the tree
dynamic.jpg -> as I have assigned a shape to the feet of the character, it can stand at a more realistic position
so back to the problem:
I’m creating a dynamic character object and assigning it a custom shape
local charFeet= { -16,16, 16,16, -16,32, 16,32 }
physics.addBody( char, “dynamic”, {friction=0.5, bounce=0.3, shape=charFeet} )
This works fine on the simulator but when I try the application of android device, the character is not printed on the screen (I’m also calling the character toFront so its not related with that)
if i skip the assignment of shape, it works fine.with the following code
physics.addBody( char, “dynamic”, {friction=0.5, bounce=0.3} )
when I use static instead of dynamic, the character is printed on the screen of the device, everything is working smoothly except as the character is static it can pass through other static objects like a ghost
so I would like to learn
-why does assigning a shape to a dynamic object creates the problem? what is the logic?
-is there a way to tell the physics that two static objects should not intersect with each other
thanks
