Picked angle?

Blitz3D Forums/Blitz3D Beginners Area/Picked angle?

Kiyoshi(Posted 2011) [#1]
Hello, I have a question. I'm making an FPS and I need to know: How would I find the angle of a picked surface using CameraPick? I'm wonderering, so that I might be able line up bullethole sprites with the walls at picked coordinates.

Thanks!


Yasha(Posted 2011) [#2]
PickedNX, PickedNY, PickedNZ sound like they do what you want.


Kryzon(Posted 2011) [#3]
Using those normal getter functions along with VectorPitch() and VectorYaw() should retrieve the angle of the normals in world space.


Jeppe Nielsen(Posted 2011) [#4]
displacementFromWall# = 0.01

PositionEntity bulletHole, PickedX()+PickedNX() * displacementFromWall, PickedY()+PickedNY() * displacementFromWall, PickedZ()+PickedNZ() * displacementFromWall
AlignToVector bulletHole, PickedNX(), PickedNY(), PickedNZ(),3; play with the last axis parameter


Kiyoshi(Posted 2011) [#5]
Thanks! Helps a lot!