Vito said:You can either take over the mouse directly, or (recommended) use Interfaces and the GUI system. Tutorials for all of them are available on UDN. You'll need to do some UnrealScript programming for this.
conscripted said:my plan of action for my development now might include making a multiuse version of this trigger.. but thats for down the road
//=============================================================================
// InLineOfSightRedirector.
//=============================================================================
class InLineOfSightRedirector extends RedirectionTrigger
placeable;
var(RedirectionTrigger) float Distance;
var(RedirectionTrigger) float MaxViewAngleDeg; // in degrees
var float AngleDist;
function PostBeginPlay()
{
Local vector DistTemp;
Super.PostBeginPlay();
DistTemp.x=1-cos(MaxViewAngleDeg * PI/180);
DistTemp.y=sin(MaxViewAngleDeg * PI/180);
AngleDist = vsize(DistTemp);
}
function Trigger( actor Other, pawn p )
{
local vector diff;
local vector view;
local float dist;
local rotator CamRot;
diff=p.Location-location;
if (Distance==0 || !(abs(diff.x)>Distance || abs(diff.y)>Distance || abs(diff.z)>Distance)) {
dist=vsize(diff);
CamRot=p.controller.getviewrotation();
if (Distance==0 || dist<=Distance) {
diff/=dist;
view.z=sin(CamRot.pitch*PI/32768);
view.y=cos(CamRot.pitch*PI/32768);
view.x=view.y*cos(CamRot.yaw*PI/32768);
view.y=view.y*sin(CamRot.yaw*PI/32768);
diff+=view;
dist=vsize(diff);
if (dist<=AngleDist) {
TriggerEvent(RedirectionEvent,self,P);
}
}
}
}