Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How would I allow users to place static meshes for building?

I want to attempt to allow users in-game to place static meshes, change the rotation of the mesh, and possibly change the material type and scale. Can anyone give me any pointers on how to go about this?

Product Version: Not Selected
more ▼

asked Jun 08 '14 at 11:16 PM in Blueprint Scripting

avatar image

32 4 5 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Custom Event>Make Transform>Spawn Actor from Class>Set Material (Using return value on Spawn).

That is basically it. Everything else comes from playing with the transform input, the material input, and finding ways to execute the custom event.

more ▼

answered Jun 09 '14 at 01:26 AM

avatar image

1.8k 131 68 110

avatar image UtopiaRTS Jun 09 '14 at 02:31 AM

Could you set a key to execute the custom event? Also, how hard would it be to make a grid system for building?

avatar image Zeustiak Jun 09 '14 at 03:09 AM

Yeah using keys to call custom events is a pretty standard action. You will probably want some conditional setups such as "if you have block in hand", then pressing key executes "Event: place block at closest grid point vector to crosshair(or whatever)".

I am assuming you want some kind of Voxel world? There are a few people working on Voxel projects so you should search for their posts/questions and see what they are up to.

Grids themselves are pretty straight forward. I use a 2D hexagonal grid in my project. Basically you do some math regarding the size of your base object(box, hexagon, etc), and then you get a vector for each grid point and store those vectors in an array. I just need 1 Array for my 2D map, but for 3D you may need an Array for each Z plane. There may be more elegant solutions though, so be sure to do some research.

avatar image UtopiaRTS Jun 09 '14 at 05:00 AM

Thank you very much, you've been extremely helpful.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question