collide problem
wyattsia
Member Posts: 15
youtube.com/watch?v=uIp0E-Nsfbs&feature=youtu.be
i hv create an actor, a ball that should collide with the wall i hv spawn.
but the ball sometimes collide, sometimes pass thru, and sometimes pass thru slowly.
what is happening?
Comments
If you could show your code..that'd be great
code of the ball?
Sometimes if the wall actor is too thin and the speed of the ball is too fast these types of glitches can happen. If your wall actor is invisible, try making it bigger and see if that fixes the problem.
Fortuna Infortuna Forti Una
i change the wall size from 8 to 20....still the same
How about changing the collide to actor wall instead of actor tag
Fortuna Infortuna Forti Una
i found the problem is because i change the attribute size (height) of the wall....
i try use interpolate is still the same.....
if i direct set the size b4 the wall is spawn....the ball cant pass thru
direct collide to actor is still the same
Move the green thing to the front. Go to your backgrounds and move it to the front or click it and then and say move to front. Then go into the green line and just put collide with ball and then go into the ball and just say collide with green line.
You do want those two object to collide right?
If the ball is moving too fast the engine will never detect the collision. Perhaps slow the ball down or make the green wall thicker so there is more of it to have to pass through, thus giving the engine more time to detect the collision.
If that does not work, perhaps your move rules are forcing the ball to continue moving even when it should bounce. I see you've set up movement with a Change Velocity Behavior and a Constrain Behavior. The Constrain might be 'forcing' the movement to continue. I'm not sure since I've never used that combination of behaviors before, consider trying an alternate method of movement.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
the green wall is not in the background......it was spawn when the game is running...
What's the idea behind moving the layers around ? I'm not saying you're wrong, I'm just curious what the idea is ?
This seems to work fine for me, I made a much thinner wall and a faster ball and had no issues at all ?
It even still works if you make the wall width = 0
I understand the green line is not a background. Thats why I said to right click it and say move to front & seeing @socks video make sure movable is unchecked and try to put bounces 0.1. & @socks sometimes when my collides don't work I move the thing I want to collide for instance the "green line" over the "ball" & then it works like a charm.. idk why its something I figured out a while ago when I first started Gamesalad!
@socks thats why I told him to put the green line in front so it'll be infant of that ball
I see, thanks.
hmmm.... but i dun wan fixed the size and the position of the wall..... if was spawn depend on where i wan it to spawn and the size might b different....
so i use spawn actor and thn change the attribute height....thn the problem appear..
the wall size was original width = 8, height = 8
when i use interpolate to change the height to the height i wan.... thn hv problem
thn i try use change attribute height...... also same
i dun know how to move to front....whn i right click....i dun hv any option to choose...
the green wall actor is an actor call "vertical wall"....it was spawn during the game
Bro this is an easy fix idk why its working for you. Do you have collide rules in the ball and green line?
Theres your problem bro... Just put collide with ball in the wall actor simple
It's not entirely clear what you are saying in the post.
yes..i hv put collide....
the game is start without the green wall in my game....
during the game, i will spawn the green wall in the position i wan....
and thn the wall's size(height) is set depend on where i spawn the green wall....
the wall's height is original 8, thn i use change size or interpolate to change the wall's size...
if i do like u...... set the green wall b4 start game.... the ball will bounce normal....
the ball will sometime collide n sometime not....
sorry ...my english not really good