0
\$\begingroup\$

I have a crate setup (in pic below) with a rigid body component, box collider and 3 circle colliders(they allow me to push the crate most of the time without getting stuck on the floor textures which are normal box colliders) As you can see in the pic there are collisions detected between the crate and floor even though they are not physically touching.

How can i make the collisions more precise as my crate gets snagged on the floor textures when there is minuscule difference between the floor box colliders?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

I would reccomend removing your box collider and then add it back again. It will automatically resize to fit your texture. It looks like it is a bit off to me.

The ground detection looks fine, but both the corner circle colliders are too low. This will cause unrealistic looking collision detection, unless you have reasons for the collider offsets.

\$\endgroup\$
3
  • \$\begingroup\$ The corner circle colliders and the offset are there to make it seem that the crate is on the ground. If the circle colliders are any lower than it seems that the crate is floating off the ground hence the circle colliders are slightly above the actual texture of the sprite renderer. Nothing is physically touching apart from the sprite renderer which shouldnt affect the colliders based on my understanding. \$\endgroup\$
    – JDolleyArt
    Jan 19, 2015 at 17:54
  • \$\begingroup\$ Which collider did you apply the friction adjustment material to? \$\endgroup\$
    – Kamakazi
    Jan 19, 2015 at 19:20
  • \$\begingroup\$ If the two corner circle colliders are removed, the object shouldn't float off the ground. If it does, just modify the dimension of the box collider rigid body slightly to take care of that sticking issue. It sees that the circle colliders are not completely necessary. Then just add a friction mat to your floor and adjust it accordingly so that it won't get stuck. \$\endgroup\$
    – Kamakazi
    Jan 19, 2015 at 19:28
0
\$\begingroup\$

I would add a slippery physics material then adjust the friction to fit your game. It should fix any hang ups.

\$\endgroup\$
1
  • \$\begingroup\$ I did already if its too slippery then its unrealistic as the crates slides all over the place. It slides fine actually its just that it is snagging on the floor collider when its physically not touching for some reason. \$\endgroup\$
    – JDolleyArt
    Jan 19, 2015 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .