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 to spawn a cube attached to another(so they stick together) with blueprints

Hello, I would like to know how to spawn a blueprint Class so the static mash sticks and shares physics with the neibor mesh, or maybe use one class that extends it's hitbox and mesh (in blueprint if possible) thanks :)

btw, just wondering what is the range of a float in ur4? Thanks for yours answears :)

Product Version: Not Selected
more ▼

asked Jul 16 '14 at 08:48 AM in Blueprint Scripting

avatar image

11 2 4 7

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

2 answers: sort voted first

You could spawn inside the blueprint a new component attached to the first one. Like that you can spawn as many as you like next to each other being the same object / blueprint while being multiple compontents.

Or do you simply need two cubes doing that? You could just place them inside of a simply actor blueprint in the space you want and they will be behave the same.

You could check out the video of procedural generated levels from epic. It might help you a little :)

more ▼

answered Jul 16 '14 at 04:36 PM

avatar image

5.9k 291 86 293

avatar image Wicpar Jul 16 '14 at 05:13 PM

thx for the help :) would the cubes that have been spawned together have the same physics? (like if they were glued)

avatar image Erasio Jul 16 '14 at 05:36 PM

Everything inside your blueprint (as long as it doesn't spawn other actors) will be handled inside the level as one object. Everything you spawn inside of it will by default be added to the root and keep it's relative position to it as long as this is not overridden by something else.

In your specific case this means you need one main object which is the root. You should decide if it should have physics or not here. All other objects (if spawned or added manually) will have to be attached to that root and mustn't have "Simulate Physics" on. Otherwise it will override the relative position and act like a separate actor (even though it isn't one).

avatar image Wicpar Jul 16 '14 at 07:18 PM

ok, thx :) could you just please tell me how the function is called to do like you describe? that would be awesome ;) (yes I'm a newb.... XD)

avatar image Erasio Jul 16 '14 at 07:32 PM

Which function? Spawning new mesh? Or what exactly?

To have two predefined objects stick together you simply need a blueprint with multiple actors.

avatar image Wicpar Jul 16 '14 at 07:43 PM

oh, is there a function to dynamically add the actors? I found the function attach actor to actor that i fire when i spawned the new cube, is there another/right/better way to do it?

avatar image Erasio Jul 16 '14 at 07:59 PM

Just search around the context menu.

There are node for most of the stuff you wanna do. In this case you could use the "Add static mesh component" inside of blueprints.

avatar image Wicpar Jul 16 '14 at 08:09 PM

Many thanks :)

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

While testing that new technique I got a problem: i push the origin cube, all goes well (exept it turne wiered as if the other cubes were not existant) and when i push another cube, nothing happends. I'd like to know how to solve that problem, so it behaves like if it would be a parallelepipedal mesh

more ▼

answered Jul 16 '14 at 09:06 PM

avatar image

11 2 4 7

avatar image DoctorPC Aug 24 '14 at 11:19 AM

maybe have a variable X, X is defined to be the location of the non-origin cube. then X becomes Y (updated X times/second), and if Y != X, you take the difference and move the origin cube accordinly?

(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