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.

Disappearing Weapon Model

Discussion in 'Ask a Coder' started by FunnyG, Sep 20, 2001.

  1. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Hi, I'm making a new weapon for UT, and I've got the code working, I've imported the new models etc., but I'm having a couple of problems with the models I've made.
    1.) When you look at the models I made (with Milkshape 3D, if that helps) from a distance, whole sections just disappear, and you can only see a couple of polygons.
    2.) When I walk up to a wall while I'm holding the gun, half the gun disappears into the wall. I'm sure there's a simple solution to this, but it wasn't in any of the tutorials I read.
    Thanks, I'm not sure if these are really coding questions, they might be more modelling questions...
     
  2. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Forget about the first thing; I sorted it out using the MESH LODPARAMS exec. Now all I need to know to finish the gun is why it disappears into walls.
     
  3. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    Now you get to mess with the CollisionRadius and Collision height for a few years an' it'll be all pretty.
     
  4. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Is that all I have to do? I thought it would be something simple...
     
  5. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Changing the CollisionHeight and CollisionRadius doesn't seem to make any difference. The only way I can stop the gun disappearing into walls is by changing the PlayerViewOffset, but then the gun's in the wrong place.
     
  6. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    It didn't work because it is evil. I don't know how to figure out the right numbers.
     
  7. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Oh well... Thanks for the help.
     
  8. Bytekeeper

    Bytekeeper Last of the Brunnen G

    Joined:
    Jul 15, 2001
    Messages:
    181
    Likes Received:
    0
    Hmm changing the collisionradius of the playerpawn should work, also your player might then be too fat to enter a room ;)
     
  9. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    He's talkin' about a gun, not a player.
     
  10. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Thanks again for the help, but I've decided to release my gun as it is, as I'm going back to university in a couple of days, and I don't have access to a computer with UT there.

    It's called Niall's BeanGun, if you're interested, you can download it and see some screenshots here
     
  11. Papapishu

    Papapishu 我是康

    Joined:
    Jun 18, 2001
    Messages:
    2,043
    Likes Received:
    0
    The collisionheight and radius is only effective in 3rd person view.
    I discovered myself that if your (1st person) weapon model clips into the walls, it's because it's big, and you're seeing an optical illusion.
    Set DrawScale (PlayerViewScale) to half it's value (or a quarter even, try it out...)
    When compiled and ready for gaming, the weapon may appear small, but then all you do is move it closer to the viewer!!
    Use this command:
    editactor class=MyPackage.MyWeapon
    (get it?)
    There you can edit the PlayerViewOffset and FireOffset to suit your weapon.
    Remember, write down your original code vaules, since this method distores the vaules (multiplies by 100 among other stuff, but you should see the pattern)
    Move it closer to the viewer and adjust so that it looks good.
    Dont change handedness or anything or you will spoil your work, at least not until you have jotted down the numbers.
    Translate these numbers and use them in your code (divide by 100, Y is inverted and stuff like that...)
    You should now find that your weapon does not clip in the walls...
    If it does, it's still too big...
    (The magic of 3D-perspective :))
    I think it all have to do with a border around the player.
    No guarantees, but it might be the 256-unit border and if your weapon is scaled too big it ends up outside this area, but it's just speculations...

    Better than sex? :D
     
  12. Papapishu

    Papapishu 我是康

    Joined:
    Jun 18, 2001
    Messages:
    2,043
    Likes Received:
    0
    BTW, the most sick ideas often makes the difference...
    See StrangeLove for instance...

    /me eating baked beans and sausages for lunch :D
     
  13. FunnyG

    FunnyG New Member

    Joined:
    Sep 5, 2001
    Messages:
    15
    Likes Received:
    0
    Thanks a lot! That worked perfectly. My BeanGun is now finished (unless someone finds a bug I've overlooked). Here's the link to screenshots and the download.
     
  14. Papapishu

    Papapishu 我是康

    Joined:
    Jun 18, 2001
    Messages:
    2,043
    Likes Received:
    0
    Glad to be of assistance :D
     

Share This Page