turn "About" spiral into single Model?

Discuss the ZGameEditor Visualizer plugin for FL-Studio.

Moderator: Moderators

Post Reply
Mic
Posts: 47
Joined: Mon May 30, 2011 8:10 pm

turn "About" spiral into single Model?

Post by Mic »

Would love a couple of hints on how to turn the "About" spiral into a single Model. A mesh would have to be created where a model is created now I think .... and a mesh can be moved about just like a model, right? How much of this can be written inside an expression? TIA,

Mic.

is there an example close to this that I can study?
Mic
Posts: 47
Joined: Mon May 30, 2011 8:10 pm

or ....

Post by Mic »

can the spiral be a group of models inside a parent model where the parent model x and y can be manipulated?

really like the spiral code where models keep on being generated and the ones that are going out of bounds get removed!
Mic
Posts: 47
Joined: Mon May 30, 2011 8:10 pm

just found spawn.proj ...

Post by Mic »

where main model.OnSpawn does its own OnSpawn ... changing x of mainModel moves all the "bits" so gonna play with that ..... is there an overhead to multiple models versus multiple meshes?
User avatar
Kjell
Posts: 1911
Joined: Sat Feb 23, 2008 11:15 pm

Re: turn "About" spiral into single Model?

Post by Kjell »

Hi Mic,
Mic wrote:Would love a couple of hints on how to turn the "About" spiral into a single Model.
Any particular reason why you'd want to do this?
Mic wrote:A mesh would have to be created where a model is created now I think .... and a mesh can be moved about just like a model, right?
All models use the same ( static ) mesh, so there's no reason to create / generate additional meshes. And, meshes can only be moved ( without being regenerated ) using the RenderTransform components .. which is what the Model component uses internally as well.
Mic wrote:can the spiral be a group of models inside a parent model where the parent model x and y can be manipulated?
Parent-child relationship / hierarchy is unfortunately not build-in yet, however you can do this yourself relatively easily.
Mic wrote:is there an overhead to multiple models versus multiple meshes?
Yes, but in most cases it is neglectable.

*Next time please edit your post instead of adding replies :wink:

K
Mic
Posts: 47
Joined: Mon May 30, 2011 8:10 pm

re: About spiral

Post by Mic »

sorry about the multiple posts - did not realize I could edit a post once it was posted!

Trying to learn ZGE by thinking of things to code - wanted to put a couple of spirals on the screen and move the whole spiral as it revolves. Looked at the way the spiral is made up of multiple models and cannot work out how to move the whole bundle ... thanks for your response .... reading it and still not sure how to do it :-)

Mic.
User avatar
Kjell
Posts: 1911
Joined: Sat Feb 23, 2008 11:15 pm

Re: re: About spiral

Post by Kjell »

Hi mic,
Mic wrote:wanted to put a couple of spirals on the screen and move the whole spiral as it revolves. Looked at the way the spiral is made up of multiple models and cannot work out how to move the whole bundle
It really depends on your exact project what is the most convenient way to do this. Attached is one possible solution .. left-mouse-button toggles between movement of the 2 groups. However, in most cases this is not the preferred solution ... for the attached example I'd normally use a model that simply renders 9 sprites ( instead of spawning 9 clones ).

Hierarchy should really be build-in though .. and with the scripting enhancements of version 2.0, it shouldn't be all that difficult to add :roll:

K
Attachments
Group.zgeproj
(2.65 KiB) Downloaded 956 times
Post Reply