Jump to content

Recommended Posts

Posted

I'm trying to create a weapon similar to this:



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?

Posted

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.

Posted
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/official/content/documentation/Scripting/Advanced/RTSPrototype.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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...