#Can anyone help me out with basic raycasting please

1 messages · Page 1 of 1 (latest)

brisk laurel
#

In a thread to not get in the way of others

#

A = False
B = Mouse coordinates

#

Not sure why this is not working

pseudo flume
#

what about it is not working?

brisk laurel
#

Ive changed it to this, and supposedly, if the ray hits omething it should return true

#

but its only resulting as false

pseudo flume
#

then the ray is not hitting anything. Did you try using Debug.DrawRay so you can see the ray you're actually using?

brisk laurel
#

does the objects need to have a ridged body to be detected

pseudo flume
#

it needs a collider

brisk laurel
#

OMG thank you

#

this is what happens when you know nothing about unity

pseudo flume
#

lol np

#

in general:
Anything involving the physics system needs a collider

#

anything involving the physics system and movement needs a rigidbody as well