Need to turn upon collision

Blitz3D Forums/Blitz3D Programming/Need to turn upon collision

Nmuta(Posted 2004) [#1]
I have an entity moving toward a wall. When the object hits the wall, I need for it to turn so that it will be perpendicular to the wall regardless of the angle of incidence.

The object is constantly moving forward on its own local z axis always.


BlackD(Posted 2004) [#2]
once the collision is detected, use aligntovector to aim it directly at the wall (as you would a decal), then turn it left 90 degrees (or right, if you like).


Nmuta(Posted 2004) [#3]
thanks!