Game Development Community

Hide Player

by Emerson Gresoski · in Torque Game Engine · 12/23/2006 (4:20 am) · 1 replies

Hi, I have the vehicles working in starter.fps, when the character mount the vehicle I want what he change the alpha to zero or hide, and, I want what the camera use the joints of the car and not of the player. Someone can help me?

#1
12/23/2006 (6:14 am)
You can add this to your vehicles datablock

useEyePoint = true;

You can also change the offset and fov, etc... look at vehicle.cc in the engine code.

cameraRoll = true;
cameraLag = 0;
cameraDecay = 0;
cameraOffset = 0;

This is how I hide the player (and its not the only way, but it works): make a transparent png 32x32 (small)
add to your players datablock:

cloakTexture = "~/data/shapes/player/invisible.png"; // this is the 32x32 transparent png

then in your mount and unmount functions:

%obj.setCloaked(true); // hide player
%obj.setCloaked(false); // unhide player