SetCloaked rendering problem
by Guimo · in Torque Game Engine · 04/25/2008 (12:57 am) · 1 replies
Hi,
I was playing with the setCloaked function and it just wont work as I expect it to. I mean, after reading the code I thought it would show a slow fase progression from alpha=1 to alpha=0, but instead the player just dissapears.
Testing:
a. Run the starter.fps mission and start a mission.
b. When mission loads and kork appears with the crossbow, press alt-c to dettack and move back a little so you get a nice view.
c. Press ~ to get the command window and enter tree() to get the unit tree. Press ~ again to close the command window.
d. In the tree, locate servergroup/MissionCleanup and open it. If you browse a little you will find a unit of the Player type. Mark its number, like 5432.
e. Open the command window again (~) and write: 5432.setCloaked(true). trye to move the windows around in order to get a clear view of kork. Write 5432.setCloaked(false) to reverse the process.
If you notice, kork dissapears inmediatly but the crossbow fades slowly. I really wonder why it works this way. Should the cloakTexture attribute be setup in the datablock for this to work?
I hope anyone may shed some light here.
Luck!
Guimo
I was playing with the setCloaked function and it just wont work as I expect it to. I mean, after reading the code I thought it would show a slow fase progression from alpha=1 to alpha=0, but instead the player just dissapears.
Testing:
a. Run the starter.fps mission and start a mission.
b. When mission loads and kork appears with the crossbow, press alt-c to dettack and move back a little so you get a nice view.
c. Press ~ to get the command window and enter tree() to get the unit tree. Press ~ again to close the command window.
d. In the tree, locate servergroup/MissionCleanup and open it. If you browse a little you will find a unit of the Player type. Mark its number, like 5432.
e. Open the command window again (~) and write: 5432.setCloaked(true). trye to move the windows around in order to get a clear view of kork. Write 5432.setCloaked(false) to reverse the process.
If you notice, kork dissapears inmediatly but the crossbow fades slowly. I really wonder why it works this way. Should the cloakTexture attribute be setup in the datablock for this to work?
I hope anyone may shed some light here.
Luck!
Guimo
About the author
Torque 3D Owner Guimo
Thanks!
Guimo