t3D - WIP 3D Engine
-
@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?
-
-
-
This is amazing
-
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?
-
I think you need to look at removeObject(handle) and then recreate with the next / previous object and using the same handle.
-
Awesome, thanks @Jonboy - I'll give that a try