Projectedx() etc

Blitz3D Forums/Blitz3D Programming/Projectedx() etc

TFT (der Falke)(Posted 2006) [#1]
Hi

sorry my english is so little bit.
A question.........

Projectedz() give 0=0 and 1=0.2 return. Bug????
If Projectedz()=0 then Projectedx() = 0. I will have
the cord. Wat can i do?

thx TFT


John Blackledge(Posted 2006) [#2]
This seems to suggest to me that the last 'picked' point is, by the time you do ProjectedX() actually offscreen.
What are you picking with? Camera? Mouse coords?


TFT (der Falke)(Posted 2006) [#3]
Hi ....

hir isent 1 Code snipe:

CameraProject cam,EntityX(schiff\hud,1),EntityY(schiff\hud,1),EntityZ(schiff\hud,1)
If ProjectedZ()>0.0 ; gibt komischerweise 0.2 zurück
If viw>0
HideEntity schiff\rad
Else
rx#=((sx/2-ProjectedX())/-(sx/1.0))
ry#=((sy/2-ProjectedY())/-(sy/.75))
If rx<-.47 Then rx=-.47
If rx>.47 Then rx=.47
If ry<-.37 Then ry=-.37
If ry>.37 Then ry=.37
ShowEntity schiff\rad
EntityColor schiff\rad,0,$ff,0
PositionEntity schiff\rad,rx,-ry,1
EndIf
Else

THX


jhocking(Posted 2006) [#4]
I don't understand your question. Specifically, what does this line mean?

Projectedz() give 0=0 and 1=0.2 return. Bug????


I'm not sure what you're getting at, but ProjectedZ returns either 0 or the near clipping plane depending on if the projected entity is withing the near and far clipping planes.