UE2 - UT2kX Cockpit from staticmesh

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

VBKesha

New Member
Jan 17, 2013
8
0
0
I trying to create сockpit from staticmesh. But if i set staticmesh too close of camera, the mesh cliping earlier than desired. How i can set cliping distantion for the mesh?
 

meowcat

take a chance
Jun 7, 2001
803
3
18
If I recall correctly you can't set the clipping distance for *just* the mesh, the clipping distance applies to everything (though see the possible workaround below). To set the clipping distance via UnrealScript use the following function:
Code:
 Instigator.ConsoleCommand("Nearclip XX");// where XX is the clipping distance, which is something like 16 by default, and Instigator is a reference to the PlayerController on this local computer

Be warned though, adjusting the NearClipping plane affects the overall range for the Z-Buffer so some parallel triangles in the distance may start z-fighting...which looks kind of bad...

Possible Workaround: If you have a custom HUD or HUDOverlay that is used to draw the staticmesh cockpit as an object/overlay (kind of like how the HUD in UT2k4 "requests" that the player's weapon draw itself via the RenderOverlays function) then you might be able to do something like:
Code:
Instigator.ConsoleCommand("Nearclip XX");
C.DrawActor(self,....);
Instigator.ConsoleCommand("Nearclip 16");
 

VBKesha

New Member
Jan 17, 2013
8
0
0
Thank you so much, this is what I need.
Another question but is there anything to set the far clipping.