Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 9450

debug_draw.DrawBox() uses erroneous Extent

$
0
0

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

The debug_draw.DrawBox() method creates a box with twice the expected Extent

Steps to Reproduce

  1. Compile this verse code
  2. Place the creative device in the level
  3. Create a box made in modelling mode, of size (512,512,512), with its location at (0,0,0).
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

my_debug_draw := class(debug_draw_channel) {}

debug_draw_demo_device := class(creative_device):

    @editable
    Extent : vector3 = vector3{X := 512.0, Y := 512.0, Z := 512.0}

    OnBegin<override>()<suspends>:void=
        DebugDraw : debug_draw = debug_draw{Channel := my_debug_draw}
        DebugDraw.DrawBox(vector3{X := 0.0, Y := 0.0, Z := 256.0}, rotation{}, ?Extent := Extent)

Expected Result

The debug_draw box should coincide with the static mesh as they have the same size.

Observed Result

The debug_draw box will have a side length of 1024, when the Extent on each dimension is 512.

Platform(s)

Windows 11, UEFN 29.40

Additional Notes

Changing the Extent editable in the example to half the static mesh’s side length makes them coincide, so this is of course an easy workaround. However, if this is the intended behavior, the documentation should be updated (according to Debug Your Game With Debug Draw | Unreal Editor For Fortnite Documentation | Epic Developer Community , ?Extent:vector3 Sets the length, width, and depth of the box)

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 9450

Trending Articles