Weapon that places objects

Scripting questions, discussions, etc
5 posts Page 1 of 1
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Sun Apr 26, 2015 6:00 pm
I'm trying to create a weapon similar to this: http://www.youtube.com/watch?v=MPRZkX9be14

I select the weapon and then i'm able to choose which item to place. Then, i can raycast and spawn the object on the raycast resulting vector. Right? This part is not so difficult. The difficult part is: how can i pre-render an object with a specific shader (semi-transparent, etc.) and then actually place it, running all it's logic? Also, how do i restrict where it can and cannot be placed (how do i detect if the model is overlapping another?)? What's the best way to do it?

Also? How do i make it work in networking?
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Fri May 01, 2015 7:10 pm
Bumping. :D
Duion
Posts: 957
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun May 03, 2015 11:03 am
There is already a turret in Torque you can place, it just gets thrown instead of placed, but isn't this similar to what you want? You could modify the existing turret.
Johxz
Posts: 441
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun May 03, 2015 4:36 pm
saindd wrote:The difficult part is: how can i pre-render an object with a specific shader (semi-transparent, etc.) and then actually place it, running all it's logic? Also, how do i restrict where it can and cannot be placed (how do i detect if the model is overlapping another?)?


You can learn from here: http://docs.garagegames.com/torque-3d/o ... otype.html
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Sun May 03, 2015 5:26 pm
Johxz wrote:
saindd wrote:The difficult part is: how can i pre-render an object with a specific shader (semi-transparent, etc.) and then actually place it, running all it's logic? Also, how do i restrict where it can and cannot be placed (how do i detect if the model is overlapping another?)?


You can learn from here: http://docs.garagegames.com/torque-3d/o ... otype.html


Nope - the RTS Prototype does not cover that. It covers placing the object at a location selected by a ray cast, but none of the cool preview rendering. It should be possible to do something with this if you have a model with this material already and then having it spawn when you enter "placement mode." Then just reposition it each tick to wherever the mouse raycast indicates. Could probably also be done with some fiddling using decals. Or a combination of a model with a decal underneath.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest