Tractor Beam Effect
by William Lee Sims · in Torque Game Engine · 10/19/2004 (10:46 am) · 2 replies
I'm trying to create a tractor beam effect. I have two people in the game and one has a tractor beam already locked on the other player. I have a "tractor beam" object which I want to dynamically create and which starts at the first player and ends by enveloping the second player.
I read Melv's documentation on creating a custom Shape within the game engine and it looks like that is the direction I should go. Since there is no server-side interaction, I wanted the custom Shape to simply have "pointers" to the two players and the clients would render the object between the two players.
My problem is that this custom Shape will constantly be changing size. For the engine to correctly render this, it seems like I need a bounding box which contains the object. I could just make the bounding box be the size of the world (the tractor beam can be quite long as long as there is a line-of-sight between the players). I'd rather the bounding box be more dynamic.
If I just change the bounding box on the client side and call the appropriate size update functions, will the engine be okay with this? And, more importantly, where do I make this size change? Do I do this in the tick function on the client side?
Thanks!
I read Melv's documentation on creating a custom Shape within the game engine and it looks like that is the direction I should go. Since there is no server-side interaction, I wanted the custom Shape to simply have "pointers" to the two players and the clients would render the object between the two players.
My problem is that this custom Shape will constantly be changing size. For the engine to correctly render this, it seems like I need a bounding box which contains the object. I could just make the bounding box be the size of the world (the tractor beam can be quite long as long as there is a line-of-sight between the players). I'd rather the bounding box be more dynamic.
If I just change the bounding box on the client side and call the appropriate size update functions, will the engine be okay with this? And, more importantly, where do I make this size change? Do I do this in the tick function on the client side?
Thanks!
#2
10/19/2004 (12:12 pm)
Cool, take a look at "beffys" teleport snippits, i bet they will be helpful for what you want to do
Torque Owner Hugo Queiriga