Advanced (Class Specific) Object Manipulation?
by Eric Roberts · in Torque Game Engine · 01/21/2006 (6:11 pm) · 2 replies
Hi all,
How/what would you change in order to have specific behavior on a selected object in the mission editor? The current object I'm developing requires the ability to specifiy vertex positions, and entering the numbers in manually is a big pain, especially relative to the object coordinates. I was thinking about adding "axis gismos" for each vertex, but as I was searching around in WorldEditor the gismo seems to be exclusive to the class (and not to the object as I had previously thought). So it seems like having class specific object manipulation is not exactly a trivial task. Unless there's something I'm missing?
Does it beg to be implemented as - say - an interior subobject? If so - can anyone offer any pointers on how to subclass it? There's very little documentation (as far as I can find) on how to subclass from it and how to set it all up in map2dif, torque.fgd, etc.
The object I'm also currently implementing supports animation (between different textures) and color/alpha blending, and it would be ideal if only one face appeared (if it were an interior subobject). I'm basically looking for a sane approach to implementing a type of forcefield (since the other forcefield object has been abandoned).
Any suggestions?
Thanks for your time,
- Eric
How/what would you change in order to have specific behavior on a selected object in the mission editor? The current object I'm developing requires the ability to specifiy vertex positions, and entering the numbers in manually is a big pain, especially relative to the object coordinates. I was thinking about adding "axis gismos" for each vertex, but as I was searching around in WorldEditor the gismo seems to be exclusive to the class (and not to the object as I had previously thought). So it seems like having class specific object manipulation is not exactly a trivial task. Unless there's something I'm missing?
Does it beg to be implemented as - say - an interior subobject? If so - can anyone offer any pointers on how to subclass it? There's very little documentation (as far as I can find) on how to subclass from it and how to set it all up in map2dif, torque.fgd, etc.
The object I'm also currently implementing supports animation (between different textures) and color/alpha blending, and it would be ideal if only one face appeared (if it were an interior subobject). I'm basically looking for a sane approach to implementing a type of forcefield (since the other forcefield object has been abandoned).
Any suggestions?
Thanks for your time,
- Eric
About the author
#2
Unless there's something I'm missing?
The idea was to create a bunch of these small geometric polygon building blocks that were completely transparent that would fade in and light up and play a noise animation, and then fade out so it was clear again. The position doesn't need to be exactly precise.
I was just thinking this morning that I might be able to pull of the custom object/vertex manipulation that I originally thought of. I'm thinking of maybe creating a few SceneObjects temporarly on onEditorEnable() for the object, and each of these SceneObjects would be tied to a vertex (so when the moved, so would the vertices). It feels like quite a hack (if I can pull it off), but it seems like the best solution given the design of the code.
Any more suggestions would be greatly appreciated as well ;)
---------------------
Additional Note:
The above didn't work as I originally had thought. The temporary creation of sceneobjects worked for the most part - but the problem came from cleaning them up, and how they should be cleaned up so the mission wouldn't get saved with the temporary SceneObjects. Long story short - the hack didn't seem worth it (after days of trying to figure out a way - and trying different ways of doing it)
01/22/2006 (2:07 pm)
I had already considered that - but there's a few things I don't like about that solution. I'm thinking about having different geometric forcefields for different levels and different situations (think a Forcefield dome). They could also be disabled/enabled and have physical properties such as elasticity, damage, etc. Having to create a DTS placed, and oriented to work exactly with the current level setup seems like it would be a big pain.Unless there's something I'm missing?
The idea was to create a bunch of these small geometric polygon building blocks that were completely transparent that would fade in and light up and play a noise animation, and then fade out so it was clear again. The position doesn't need to be exactly precise.
I was just thinking this morning that I might be able to pull of the custom object/vertex manipulation that I originally thought of. I'm thinking of maybe creating a few SceneObjects temporarly on onEditorEnable() for the object, and each of these SceneObjects would be tied to a vertex (so when the moved, so would the vertices). It feels like quite a hack (if I can pull it off), but it seems like the best solution given the design of the code.
Any more suggestions would be greatly appreciated as well ;)
---------------------
Additional Note:
The above didn't work as I originally had thought. The temporary creation of sceneobjects worked for the most part - but the problem came from cleaning them up, and how they should be cleaned up so the mission wouldn't get saved with the temporary SceneObjects. Long story short - the hack didn't seem worth it (after days of trying to figure out a way - and trying different ways of doing it)
Torque 3D Owner Stephen Zepp