1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

UE2 - UT2kX Cockpit from staticmesh

Discussion in 'Modeling & Skinning' started by VBKesha, Jun 17, 2013.

  1. VBKesha

    VBKesha New Member

    Joined:
    Jan 17, 2013
    Messages:
    8
    Likes Received:
    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?
     
  2. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    803
    Likes Received:
    3
    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");
    
     
  3. VBKesha

    VBKesha New Member

    Joined:
    Jan 17, 2013
    Messages:
    8
    Likes Received:
    0
    Thank you so much, this is what I need.
    Another question but is there anything to set the far clipping.
     
  4. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    803
    Likes Received:
    3
    I'm not sure, I don't think one exists. You could try something like "Farclip XX" but I've never bother to try to set the farclipping plane and I was only aware of the Nearclip console command as listed here on the UDN Two. Here are some other Console (Exec) commands too.
     

Share This Page