TFORM!!??

Blitz3D Forums/Blitz3D Beginners Area/TFORM!!??

What the heck is it!??!?!? Someone please help me. I keep posting questions on what it is, but no one seems to give me a straight answer. can someone please tell me what the tform commands do in Blitz3D and what i can use them for, PLEASE??!!

P.S. i don't mean to sound angry, but i just don't get this stuff and there are no samples in the Command ref.

Thnx in advance

well here is a way I use it. Hopefully it helps.

The code is used to do a linepick directly from the man in a Z direction of 250 units, whichever way the man turns.
So if the linepick selects a wall as he runs towards it, something happens. However it does not select the wall unless he is facing it. Imagine a spear stuck in his chest
which protrudes out the front only. It follows hime whichever way he turns.

Does that make sense ?

TFormVector 0,0,250,man,0
pick3=LinePick(EntityX(man,True),EntityY(man,True),EntityZ(man,True),TFormedX(),TFormedY(),TFormedZ())
If pick3=wall then do something

you could also use it in the Y direction to pick the floor

TFormVector 0,-10,0,man,0

I am not an expert but it may help.

you could also use the first example to select targets for gunshots.

ok i'm gonna sound like an idiot, but, really quickly, what is linepick? :P

Linepick performs something like a virtual laserbeam. An entity surface location that will be hit by the beam (if any) can be determined by pickedX(), pickedY() and PIckedZ(), furthermore there are PickedENtity etc. (Altough: a=LinePick(parameters..) will return the entity handle of the picked entity in "a" already).

Tformpoint is often used to convert the location of a local thing (eg. a vertex position is relative to the mesh position and rotation etc.) to global world coordinates. Tform commands are usually understood as soon as you need them :)

I suggest to use the online manual. If you eg. enter the search string "pick" then it will list all commands that have something to do with linepicks: CameraPick, PickedX, PIckedYaw and so on. Browsing a command-family this way makes things easier IMHO.

thnx, that helps