linepick again

Blitz3D Forums/Blitz3D Programming/linepick again

cash(Posted 2004) [#1]
I have asked this a long time ago but there was no real answer. I need to use this again so any new help may be useful.

I want to use linepick to target enemies. But does anyone have any examples on how to make the "line" rotate with the player. Like translating yaw or something.

When the man turns the linepick stays pointing in the wrong direction.


AntonyWells(Posted 2004) [#2]
tformVector 0,0,1000,myPlayer,0
linepick(entityX(myPlayer,true),entityY(myPlayer,true),entityZ(myPlaer,true),tformedX(),tformedY(),tformedZ())

This'll do just that. you may want to change 1000 to minus 1000, depending on your models default pose.

And 1000 can safely be reduced or increased to tweak the range.


WolRon(Posted 2004) [#3]
Thanks, this will be useful for me as well.


cash(Posted 2004) [#4]
Works great..I sometimes think I should start learning Blitz all over again..


AntonyWells(Posted 2004) [#5]
Heh don't be hard on yourself..two years ago I didn't even know what a linepick was, let alone how to use it :)