- Home /
How solve the 2d collider penetration problem ?
as you see in the video i have problem of circle collider penetrate in the 2d box collider i manipulate 2d physic setting but no diffrence link text
the other problem is bounciness on platform
and other thing that i want to add about bounciness on moving platform is that even i set bounciness of physic material to 0 for both colider the stone bounces on platform
CAn capture bit bigger video , i am not able to see the collision...
no answer.unity3d.com dont support file bigger than 550kb but the video is clear and collision intersection is obvious
about two years ago i post a question and get my replay right away but know about a week spent and no answer ,,, is that so hard
Answer by brunocoimbra · Dec 30, 2015 at 03:36 PM
How are you moving the platform?
The Unity's physics isn't the best option for platform games, did you tryied out using the Raycast system?
Here is a quite simple tutorial that made me easily understand how raycast can be useful in platform games: https://www.youtube.com/watch?v=z20wHJSXk98 (this is the part 6, that talk about moving platforms, but you will really want to watch it from beggining)
As an another option, you can make a script for the platform, so every time platform collides with the ball it makes the ball a child of the platform.
Something like that:
void OnTriggerEnter(Collider other)
{
if (other.tag == "ball")
{
other.transform.parent = transform;
}
}
void OnTriggerExit(Collider other)
{
if (other.tag == "ball")
{
other.transform.parent = null;
}
}
If it helped you to solve your problem, mark it as the correct answer, so you will help other users to quick find the answer.
actually i had that tutorial and it is not completely help me cause i want use physic engine and i disappointed but better than nothing
Answer by robertofantasy · Dec 26, 2015 at 02:03 PM
IS THERE ANY ONE ?
is there any one to solve my problem
how can ask unity company experts ?
You'll have to provide more information on how you have set up the objects, as this doesn't happen on a simple test scene I just tried it on.
i am creating a 2d platformer game . i have stone ball that is the player and a platform that animated in unity . the stone ball has circle 2d collider and the platform has rectangle 2d collider i have 2 simple problem
when the player (stone ball) is on the platform and when the platform going up the two collider (ball stone and platform) kind of penetrate together i want to not happne
when the ball is on platform and platform going down the ball bounces like when you play with ping pong verticaly
IS THAT CLEAR
Your answer
Follow this Question
Related Questions
C# 2D Jumping with AddForce doesnt work 1 Answer
2D Movement Mechanics for Platformer Game 0 Answers
I have a problem with Layermask Unity2D 0 Answers
Play and Stop Animation 1 Answer
Random increase of int in PlayerPrefs 0 Answers