• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges

Raycasthit2d

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

SteenPetersen commented

Raycasthit2d bug

May 10, '23 2d·scripting problem·pathfinding·raycasthit2d

1 Reply

0 Votes

avatar image

unity_B0B0169EB75B380006BD answered

there is something wrong with the hit.collider.tag == "Player" condition ?

Apr 17, '23 collider·tag·raycasthit2d

2 Replies

0 Votes

avatar image

CrownIR1 asked

Raycast2D LayerMask Problem (Or maybe something else)

Apr 15, '23 raycasthit2d·layermask

0 Replies

0 Votes

avatar image

Rachan answered

Layer Mask on raycast2d not working?

Mar 24, '23 2d·raycast·raycasthit2d·layermask·layercollision

2 Replies

0 Votes

avatar image

kyepir asked

Move/Dash to Specific Point

Mar 15, '23 in Help Room

0 Replies

0 Votes

avatar image

MrWy07 edited

Multiple raycasts around object

Jan 21, '23 raycasting·raycasthit2d·isometric·linecast

1 Reply

0 Votes

avatar image

Xiaozo edited

Raycast2D hits only one side of a box collider2d

Jan 16, '23 in Help Room

0 Replies

0 Votes

avatar image

unity_I8FaTX-tZFc4lA edited

Make my player activate objects around it using RayCastHit2D

Jan 2, '23 raycast·raycasting·raycasthit·ray·raycasthit2d

1 Reply

0 Votes

avatar image

Brinff published

How to calculate formula to the Ray path?

Dec 13, '22 scripting problem·raycast·raycasting·raycasthit2d

0 Replies

0 Votes

avatar image

CrashCZ commented

RaycastHit collider is always null

Dec 4, '22 raycast·collider2d·raycasthit2d

1 Reply

0 Votes

avatar image

sacredgeometry answered

Object reference not set to an instance of an object

Nov 30, '22 raycasthit2d·cat

1 Reply

-1 Votes

avatar image

wedgiebee edited

RaycastHit2D normal returns raycast in opposite direction, not surface normal.

Nov 28, '22 in Help Room

2 Replies

0 Votes

avatar image

AnibalRetro commented

How to prevent the character from jumping in the air with Raycast 2D?

Nov 23, '22 c#·raycast·unity 2d·raycasthit2d

1 Reply

0 Votes

avatar image

AnibalRetro asked

How to prevent the character from jumping in the air with Raycast 2D? Closed

Nov 22, '22 c#·raycast·unity 2d·raycasthit2d

0 Replies

0 Votes

avatar image

mellasgdv asked

RayCast or LineCast can't detect Enemy!! Unity 2D

Nov 4, '22 c#·2d game·2d sprites·raycasthit2d·2.5d

0 Replies

0 Votes

avatar image

sisse008 answered

How to get mouse direction to use in RaycastHit 2D?

Oct 30, '22 raycast·raycasthit2d

1 Reply

0 Votes

avatar image

VinGame90 answered

RaycastHit2D with tag isn't working, what's wrong? [BEGINNER]

Oct 30, '22 2d·raycast·2d game·raycasthit2d·input.getmousebuttondown

2 Replies

0 Votes

avatar image

Captain_Pineapple commented

raycast2d always returns null

Oct 1, '22 raycast·null·raycasthit2d

1 Reply

0 Votes

avatar image

galahad_here asked

Raycast registering hit when the player touches the target gameobject

Aug 20, '22 player·unity 2d·raycasthit2d·physics.raycast·drawray

0 Replies

0 Votes

avatar image

nlawgames edited

LineRenderer position gets stucked after RaycastHit2D

Aug 20, '22 in Help Room

1 Reply

0 Votes

avatar image

unity_0B4D78500DE0ACD767CF published

[Solved] Raycast2D and Main Camera Closed

Aug 9, '22 camera·raycast·raycasthit2d·main camera

0 Replies

1 Votes

avatar image

unity_F39629EA2ED72899BD12 published

Basic raycast issues

Aug 2, '22 raycast·2d-platformer·raycasting·enemy ai·raycasthit2d

0 Replies

0 Votes

avatar image

wideeyenow_unity commented

Raycast2D not detecting angle when the orgin object collides with another

Jul 31, '22 in Help Room

0 Replies

0 Votes

avatar image

fra_con commented

Can you help me with point and click movement with raycast?

Jul 25, '22 in Help Room

1 Reply

0 Votes

avatar image

Sohodollie commented

Object Reference Not Set To An Instance Of An Object

Jun 25, '22 in Help Room

1 Reply

0 Votes

avatar image

TheTrueDuck answered

Can't have hit collider ignore button

Jun 22, '22 in Help Room

1 Reply

0 Votes

avatar image

RodrigoSeVeN commented

Raycast2D is hitting itself even when set to ignore own collider

Jun 8, '22 in Help Room

5 Replies

1 Votes

avatar image

Gallareton edited

two boxCasts casted from same point give different results

Jun 6, '22 in Help Room

0 Replies

0 Votes

avatar image

SamyBoyJim commented

RaycastHit2D returns incorrect results when magnitude is 0

May 29, '22 raycast·vector2·raycasthit2d

2 Replies

0 Votes

avatar image

rukukuku asked

How to control multiple gradients

May 9, '22 raycast·raycasting·distance·raycasthit2d·gradient

0 Replies

0 Votes

  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Related Topics

raycast c# raycasting 2d physics2d collider2d 2d game 2d-platformer unity 2d raycasthit scripting problem ray linerenderer collider 2d-physics collision detection collision tilemap layermask physics2d.raycast gameobject collision2d rotation boxcollider2d vector2


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges