Unity raycast hit 2d how to track the void?

Shoot raycast it hits but I can't track when it shoots into the void just doesn't work
RaycastHit2D hit = Physics2D.Raycast(Vector2.down Vector2.up);
if (hit.collider == null)
{
scrollSpeed = Mathf.MoveTowards(-10f, 0, velocity * Time.deltaTime);
}
March 19th 20 at 08:40
1 answer
March 19th 20 at 08:42
Solution
hit - will store the last value anywhere. while something would hit.
no physics in unity of the concept - "faced with the emptiness".

so you or zanoletti before each test (although I do not remember if it works) or a single global Collider/trigger Ala "the border of peace" to do)

well generally the logic of physics involves the reaction to "something there". the collision, intersection, etc.)
try to write
what skalitsa/moves/what you had it doing there always, and stops if beam crashed into something.
so correction about the vanishing, and so was created one-time RaycastHit and a link to raycast through out.

but the Council is about to do until you face it or at least check out what it is exactly null in effect.

maybe you have always crashed into something)) and you do not know. - Dulce.Lind commented on March 19th 20 at 08:45
@Dulce.Lind, the fact that I do the roulette and I have to select the cell in which the line and sometimes using debug I look and see that the line between cells and I tried this code to make zakrutku if playcast shoots past
+ I have all objects except the cells should ignore raycast - patsy commented on March 19th 20 at 08:48
did it ever occur to you that you don't need real roulette. just separate math??)

I understand many times and no one was talking about your keisy)

and in your case, you'd better not beam test. and the trigger to deliver. who last touched - the and selected.
touched a new element - he is now "selected"

if the roulette stopped - to center the selected element to the desired position.
and repeat all these freaks bugging you because of the fact that you don't have a Mat. roulette model.

out the likelihood of deposition. revolves list. selects a random element. all of this should without a drop interface to work just in the console program.

and then this display of what to sculpt. everything else - sorry - clumsy hrenota. - Dulce.Lind commented on March 19th 20 at 08:51

Find more questions by tags Unity Game EngineC#