Mounting dynamic objects on top of one another
by Kevin Lu · in Torque Game Engine · 12/22/2009 (11:18 pm) · 4 replies
Does anyone know what the easiest way is to mount dynamic objects on top of one another? For instance, if the sky was falling and it landed in a truck, how do you get the clouds to stack on top of each other?
Any help would be GREATLY appreciated!
Thanks,
Kevin
Any help would be GREATLY appreciated!
Thanks,
Kevin
About the author
#2
Does that make sense? Can anyone help? :)
Thanks,
Kevin
12/23/2009 (5:36 am)
OK, sorry, it does sound funny reading it the second time. :) Let me use a new analogy (or is it a metaphor?). Whatever. If cats and dogs are falling out of the sky, and there's a person trying to catch the animals and he succeeds in catching dogs in his (fictitious) glove, how do you stack the dogs on top of one another? If he misses the animals falling from the sky, then they are just deleted when they reach the world limit.Does that make sense? Can anyone help? :)
Thanks,
Kevin
#3
From a 3D TGE perspective, I would have the 'player' character store a pointer, to the last object he caught. Initially the pointer would be 0, since he hasn't caught any objects. Then when an object is caught, it is mounted. If the pointer is 0, then the object is mounted right on the character's hand. Otherwise, the object is mounted on the object the pointer... points to. And then the pointer is modified to remember the latest object that was caught.
That would require that each of the falling objects was a shape with a mount node on top of it, where the next object would be 'stacked' on it.
12/23/2009 (8:39 am)
Ah, so it's a question to do with game mechanics, not philosophy ;).From a 3D TGE perspective, I would have the 'player' character store a pointer, to the last object he caught. Initially the pointer would be 0, since he hasn't caught any objects. Then when an object is caught, it is mounted. If the pointer is 0, then the object is mounted right on the character's hand. Otherwise, the object is mounted on the object the pointer... points to. And then the pointer is modified to remember the latest object that was caught.
That would require that each of the falling objects was a shape with a mount node on top of it, where the next object would be 'stacked' on it.
Torque Owner Daniel Buckmaster
T3D Steering Committee
I don't mean to make fun, but I genuinely cannot understand what you're asking.