TForm commands

Blitz3D Forums/Blitz3D Beginners Area/TForm commands

fox95871(Posted 2009) [#1]
Hi, could someone please shed some light on where in a typical game the TForm commands might be used, and if I would need them in a game like mine, which is going to be very much like Final Fantasy VII, except with just the 2.1D maps and a lot of running and jumping, like an obstacle course game. 2.1D is a name I made up for: the levels are 3D, the character is 3D, and they come in contact with each other, but the camera never moves, so the graphics can basically just be an overlaid painting made to look like a true 3D scene.


Stevie G(Posted 2009) [#2]
Use the seach facility - these commands have been discussed hundreds of times.


big10p(Posted 2009) [#3]
They have, and they're extremely useful.


fox95871(Posted 2009) [#4]
Oh okay, never mind my EntityType topic I started today then! I'll do a search, I just thought it'd be more specific this way.


fox95871(Posted 2009) [#5]
I'm probably gonna take heat for this, but does it seem to anyone else like the TForm commands could be replaced by a simple pivot or alpha 0 mesh tracking system? I thought that, then I read basically the same thing in the thread: TFormPoint trouble. Even though that's what I want to believe, I'd like to hear any objections. I'm sure there's a lot of games much more complicated than mine that need commands like this, but is that really true? To what extend could you stretch the usefulness of a simpler tracking system?

Consider also that my game is exploration only. No shooting, no trajectories, just running and jumping in complex levels. Would I still need the TForm commands, or could I get away with basically just an all collisions game?


Matty(Posted 2009) [#6]
I use them all the time in my games (the tform commands), a simple example would be to work out if an object is behind or in front of another object:

a simple example is this eg:
Tformnormal entityx(otherspaceship)-entityx(myspaceship),entityy(otherspaceship)-entityy(myspaceship),entityz(otherspaceship)-entityz(myspaceship),0,myspaceship

If Tformedz()<0 then 
;OtherSpaceShip is behind me
endif




Stevie G(Posted 2009) [#7]
This achieves the same goal ..

TFormPoint 0,0,0,otherspaceship, myspaceship
If TFormedZ() < 0 Then
	;OtherSpaceShip is behind me
EndIf



Ross C(Posted 2009) [#8]
You can use it if you need to do a linepick straight down from a meshes orientation too. You tform the vector straight down from your meshes world space, and it will return the GLOBAL vectors for the linepick. You could do tform commands yourself, but i think they save you the headache.