Object Moves Through Wall (with enough tilt)

Hi...new to Corona....

I have created a static wall in which an object is to bounce off (like it does with the floor). However, with enough tilt, the object begins to go through the wall, eventually moving through it. Any suggestions of what I need to add in order for the wall to act as intended?

Thanks in advance!

try setting .isBullet=true on the object

Thanks!

I've got this same problem!
In the simulator, the object just gets 'sticked' to the wall and when I try move it the other way I'm forcing it to leave the wall

And on the device with enough tilt the object moves right through it..

I've tried setting isSleepingAllowed to false, a suggestions from another thread, and isBullet=true both don't work..

I second NahirC. I have the same problem even after attempting the same solutions. In addition, I have an animated moving wall that the object sticks too when they collide. Any Solutions?

same problem here! I was going to purchase corona tonight and still might, but this is very disappointing. Anybody else have any solutions?

Me too! And walls are important in my game.. Nobody with a solution?

Might we hear from someone over at Ansca?

I'd appreciate that too

This is a solution that I received from PeachPellen. It "solves" the problem (keeps the ball on the screen), but there should be an actual solution in which the walls actually do their job. At any rate, I was very appreciated of this method....this should keep the ball on the screen as you try other things:

Note: in landscape mode (basically, if it tries to leave the screen and exceeds the end value....it keeps it on screen) my values work for me....(you may want to 0 instead of 20, etc.)

---- Keeps balloon on screen

local function keeponscreen (event)

if balloon.x < 20 then
balloon.x = 20
end
if balloon.x > 460 then
balloon.x = 460
end
if balloon.y < 0 then
balloon.y = 0
end
if balloon.y > 320 then
balloon.y = 320
end
end

Runtime:addEventListener("enterFrame", keeponscreen)

If you, or anyone else reading has a very simple tutorial on collisions. I would appreciate it! I have been stuck for weeks just trying to get a ball to collide with a red box and have something happen, and if it collides with a blue box have something else happen. Any help would be appreciated!

Thanks alot William, this does the job beautifully! But yeah, walls should be fixed..

For collision. This is the code you'd want to use:

1
2
3
4
5
6
7
local function functionName(event)
    if(event.phase == "began") then
        local variable = display.newText("Hi")
    end
end
collidingObjectName.collision = functionName
collidingObjectName:addEventListener("collision", functionName)

Thanks! New to Corona...and I typically need to see something on a very small scale before I can apply it to larger things.

Is this what you had in mind?

local function functionName(event)
if(event.phase == "began" and event.other.class == "blueBox") then
local background = display.newImage ("background2.png")
end
end
balloon.collision = functionName
balloon:addEventListener("collision", functionName)

Am I missing something? Is there a particular place that I should put it in the code?

That's right. You can put the code anywhere as long as it's outside other functions or other if statements, if you want the collision to be active all the time that is

That workaround for the wall issue is buggy btw. It makes it hard to make the ball slide along the wall. Does nobody have a solution to this issue? How do people create simple ball games with working walls?!

Any real solution to this yet? My objects are moving through walls like there's no tomorrow

Come on! I've e-mailed support with no response for 3 days now

I've given up on Corona for now. In the mean time, I've finished a smaller project using Xcode. I hope to come back to my Corona project....I do see promise in Corona. However, I need more tutorials of small projects so that I can grasp some of the features (collisions are still giving me problems).

I am having the same problem. Our objects go right through the walls with enough collision. They are set to isBullet = true, a density of varying amounts up to 100, and still they just go right through other objects.

Ansca Staff, please reply to this thread!

Can anyone post some example code? Perhaps a small example that you're working on?

The game I worked on which currently got approved and is on sale
DraggingPhysics does not uses tilt but has a lot of collision and ill try
help as much as possible with this problem.

in DraggingPhysics I gave all my walls bounce physics to avoid this
you can set the bounce to very low like 0.1 or 0 and it seem to work.

My current Project uses Tilt and has a lot of walls and there is a few things
you can try because my object does not goes through walls even with enough
tilt.

Here some thing you might want to try:

1: change the numbers around density bounce friction damping ect...

2: add physics to your walls (bounce worked great)

3: lower the velocity of your tilt

4: you can always follow post #9 in your codes it will prevent this
(but depends on how your game is design)

Im currently not on my project atm so I hope this helps if not I will try post
few codes to get you going or if you can post your code I can help you out.
You can always send me an email to leivagames@gmail.com and I will try help
you out as much as possible Good Luck!

Guys, any word on this? I'm having this issue as well for two fast moving object that should collide but do not.

Both have isBullet=true

My example is a moving ball getting hit by a rotated bat. The bat goes right through the ball sometimes.

Help?

Andyg, did you try making the bat static?

So, I think it would work to make it static or kinematic, however that would impact game play I think. Also, it's kind of a hack, no?

I currently have a small static body that the dynamic bat is jointed to with a pivot. It has rotation limits, etc. I send applyTorque calls to swing it.

If I change the body type this will no longer work right?

views:2016 update:2011/10/1 9:04:19
corona forums © 2003-2011