Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about raycasting

Read more about raycasting

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - raycasting

Raycast2D not detecting Rigidbody2D

I have a box that fires a 2D raycast forward every few seconds, and want it to detect the player's rigidbody2D. I am able to get the raycast firing (the debug draws it correctly), but for some reason ...
test-img

Phoenix

c#

unity-game-engine

raycasting

rigid-bodies

Votes: 0

Answers: 1

Latest Answer

Make sure when doing raycasts against GameObjects with a Rigidbody or Rigidbody2D component, that there is also a corresponding Collider or Collider2D component (either on the GameObject itself, or on...
test-img

Nathan Wiles

Unity Raycasting: "Camera.main.ScreenPointToRay" works, "new Ray(...)" does not

right now I'm working on a planet generation project in the Unity engine. The problem I have happens when I want to place plants on the planet surface. My approach is to cast rays from the center of t...
test-img

BanditBloodwyn

c#

unity-game-engine

raycasting

Votes: 0

Answers: 1

Latest Answer

By default raycasts in Unity do not hit the "inside" / backfaces of a Collider. You start your ray inside a sphere and want to hit the surface from the inside. You will have to enable Physic...
test-img

derHugo

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved