- Home /
How can i add 0.5 to a side of a block?
I want to use a raycast to hit a side of a block, then add 0.5 to the normal of that side. So if i hit the top of the block, it adds 0.5 to the hit.point on the y axis. If i hit the front of the block it adds 0.5f to the hit.point on the z axis. How can i use this using RaycastHit.normal or normalized? Thanks. C#
Answer by nsxdavid · Feb 26, 2015 at 04:33 AM
You are looking for something like:
hit.point += hit.normal * 0.5f;
Yes but I have tried that and it didn't work. Is there any other way of doing it? Ins$$anonymous$$d of hit.normal * 0.5f I used hit.normal / 2. That would still give the same results correct?
Your answer
Follow this Question
Related Questions
Normal distribution random 3 Answers
!IsNormalized (normal) 5 Answers
Animation.NormalizedTime is not working 1 Answer
Creating decal, terrain normals not working 1 Answer
Two normals in one material 1 Answer