No announcement yet.

Is it possible to enable ZTest for weapons?

  • Filter
  • Time
  • Show
Clear All
new posts

    Is it possible to enable ZTest for weapons?

    look at this:

    (dont bother the white background, i painted it for making the filesize smaller...)

    you see a melee weapon with 3 claws and a middle stick. the claws and the stick are partially inside "Axon". But the engine renders them over and not "inside", i assume because epic disabled the ZTest for 1st. person view weapons.

    is it possible to reactivate the test or is this hardcoded?
    I know that finalblend materials have a bZTest flag, but i dont know how to get an instance of the actually used material of the weapon.

    so please:
    say me how to get an instance of the used material of the weapon
    say me if its possible to enable / disable the ztest dynamically for certain objects.

    it isn't that important but it would be "nice".

    thanks in advance, sky

    It does that because 1st person weapons are not rendered with the rest of the world but are instead drawn straight on the canvas with DrawActor.

    You might be able to change that by setting bHidden to false for the weapon and overriding whichever weapon function calls DrawActor.


      i tried it and in fact that is the reason. but unfortunately the weapon is extremely laggy, so if i run backwards i see my weapon 1 meter ahead and when i run forwards i can see only the front tip of the weapon

      i guess it isn't possible

      nevertheless, thanks