Check the lua file physicsEditor creates as that also uses filters.
Dave [import]uid: 117617 topic_id: 33195 reply_id: 131907[/import]
Check the lua file physicsEditor creates as that also uses filters.
Dave [import]uid: 117617 topic_id: 33195 reply_id: 131907[/import]
You are a lifesaver! I am creating rectangles at the locations of my obstacles and then just detecting the collisions with the rectangles. Problem solved. [import]uid: 59735 topic_id: 33195 reply_id: 132020[/import]
Are the objects in the same group if not is one group not aligned with the other [import]uid: 7911 topic_id: 33195 reply_id: 131917[/import]
Great catch @jstrahan, that’s yet another of the frequent issues with collisions… I should have remembered that one.
@BoltVisual, what he means is, did you “shift” the display group (X/Y) that contains the plant to a different position than the group(s) that contain the character and the building? If so, you’ll see the body shape of the plant traced in the hybrid physics view, but it will not be the correct representation of where the collision will take place. For collisions to function properly, ALL display groups that contain colliding or potentially-colliding bodies must share the same “coordinate space”.
Brent
[import]uid: 9747 topic_id: 33195 reply_id: 131956[/import]
This is definitely the problem! Thank you! I would have never guessed. I move the group with the plant box and so the collision point for plant never actually moved…However, there really isn’t anything I can do about this because I am using multiple maps which Lime really doesn’t support, so I have to put them into a new group to manipulate them all.
So, my goal is to play a sprite of some leaves when the player collides with the bush.
For now, I think I will request the coordinates of that tile then put a little transparent rectangle to capture the collision then display the leaves sprite.
Anyone have a better workaround? [import]uid: 59735 topic_id: 33195 reply_id: 131970[/import]
You could try this
http://docs.coronalabs.com/api/type/DisplayObject/contentToLocal.html
Don’t know if it works with physics, never tried it with physics. [import]uid: 7911 topic_id: 33195 reply_id: 131971[/import]
You are a lifesaver! I am creating rectangles at the locations of my obstacles and then just detecting the collisions with the rectangles. Problem solved. [import]uid: 59735 topic_id: 33195 reply_id: 132020[/import]