Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    t3D - WIP 3D Engine

    Work In Progress
    9
    26
    1516
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tratax
      Tratax F last edited by Tratax

      @Jonboy, you have inspired me to build a level editor for the 3D Demo... realising i'd probably need this if I wanted to save any of the work put in!

      Here is the progress..

      • Got stuck trying to work out using arrays vs structs, thanks to @pianofire for your help and answers!

      • Built an attempt at this in 3D, got stuck realising i'd need to think and plan out the logic before just writing the code

      • Re-wrote this in 2D, top down, realising I could then translate the X/Y concepts to X/Z - got it working with object creation and manipulation of position!

      • Re-wrote again in 3D .. Starting to feel it come to life!

      My current challenge is toggling l/r should change the active model displayed before placed however currently only displays the last placed object.. Is anyone free to have a look at the code and share some suggestions?

      1 Reply Last reply Reply Quote 1
      • Tratax
        Tratax F last edited by

        Another example of the object preview/placement bug

        1 Reply Last reply Reply Quote 1
        • waldron
          waldron F last edited by

          This is amazing

          1 Reply Last reply Reply Quote 0
          • Tratax
            Tratax F last edited by Tratax

            So! I have learnt from this that to do a level editor with a preview you need two things:

            • All the models loaded, all the objects associated to those models and then all models placed as objects
            • Two instances of the placed objects, the preview object and then the placed array object

            Seems the approach now is to change the preview object model as it increments through the model index... @Jonboy @Dave - Any suggested approachs on how to change an objects model ? I cant see an existing function like changeModel(current,next) so assuming i'll need some trickery?

            1 Reply Last reply Reply Quote 0
            • Jonboy
              Jonboy Fuze Team last edited by

              I think you need to look at removeObject(handle) and then recreate with the next / previous object and using the same handle.

              Tratax 1 Reply Last reply Reply Quote 0
              • Tratax
                Tratax F @Jonboy last edited by

                Awesome, thanks @Jonboy - I'll give that a try

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post