- Home /
Question by
SirKingKrab · Mar 15, 2021 at 03:41 AM ·
vector3programmingtrigonometryprogramming-basics
How to get a point that's inside a collider relative to the point a raycast hit
Hello.
I'm trying to figure out something that might be a bit easier than I thought but I'm not too sure on the math. I have a point from a raycast result. It hits some collider (In this case a box collider). I need to get an object to move into the center area of this box collider in a way that's relative to the point of contact with the raycast.
I know the center of the box collider given the position of that object and I know the point because of the raycast.
What are some places I can look into to make this happen? Thanks.
Comment