A
A
Artem7777642020-11-08 16:56:03
css
Artem777764, 2020-11-08 16:56:03

How to solve this border bug?

The essence of the question is this: I have a scene (2d), on it is a frame + a cube inside it. The cube can move (there is no gravity). The cube has colliders and a rigidbody, the frame is just a collider. When I hold down the move down button and the cube reaches the frame, it does not completely stop, but starts to "twitch" trying to pass through this frame. Is there any way to solve this problem? I tried to check the coordinates of the cube to prevent it from going that far, but if the border changes, then the code will stop working normally. Can you please describe in detail the easiest way to solve it? (I'm new to Unity, don't judge too harshly). If needed, I can add more.5fa7f8a6d647a656540727.jpeg

Answer the question

In order to leave comments, you need to log in

6 answer(s)
H
HamSter, 2016-07-07
@Alex7878

As an option - clip-path
example
generator
Here's what else I got

R
Roman, 2016-07-07
@arkanroman

why troubles? at the top we have a cropped picture. You raise the bottom block up through a negative margin. To this block you throw a white triangle on before

O
Oleg, 2016-07-07
@politon

Alternatively https://jsfiddle.net/joomla/cn0rq8bL/
But svg is better

S
Sergey ZSA, 2016-07-07
@serjikz

We draw a block in PS with the same angle, export it to svg, set a background for before/after to the next/current block. If the option does not fit, you need to know why it does not fit and watch the design in its entirety.

A
Alex7878, 2016-07-07
@Alex7878 Автор вопроса

Да убрать убрать угол у картинки не составит труда, хотелось бы как то так блок сверстать. Чтобы без заморочек с картинками с админки выводить. В оригинале там еще один блок наложен, тоже не стандартный. Вот и не знаю с какой стороны подойти
8be4bf2a7d344684a4d39f4feca959b2.png

A
AlexanderShustik, 2016-07-07
@AlexanderShustik

Попробуй верхнему блоку задний фон изображением задать

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question