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"

Attached Actor set Rotation?

Hello, I am trying to set the rotation of an attached actor. I am tempting to do this using action inputs.

Right now, I spawn an actor from class at my "Spawn Location" (Arrow Component) using action "spawn" and flip/flop to detach actor. What I want to do is set actor rotation before the actor is detached..

I can change the rotation before the Actor is spawned using the input action, but I want to see the actor's rotation change during game play before the item is detached.

Should I be changing the rotation of the socket..? Im stumped!

Any help would be appreciated.alt text

Product Version: Not Selected
testactorspawn.png (294.5 kB)
more ▼

asked Mar 16 '15 at 05:54 AM in Blueprint Scripting

avatar image

205 13 25 27

avatar image CDMcGwire Mar 16 '15 at 08:09 AM

Do you need to make a copy of that "Set Actor Rotation" node? Because it's only being called after the Actors are being attached. If I understand this statement correctly... "What I want to do is set actor rotation before the actor is detached" Then it seems like you'll want another rotation function on the B track of the Flip Flop.

avatar image mdmoberly Mar 16 '15 at 12:37 PM

Thanks for the reply! I did try that during testing and this works as far as detaching with a set rotation, however I need the actor to be rotated while it is still attached so I can view the rotation before detaching.

Maybe I am going about this wrong.. :(

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

2 answers: sort voted first

You can slap a Gate before the Detach Actor. Once the rotation is done, send an exec pin or custom event to the Open input on the Gate. That'll make sure your rotation happens first

That's the best answer I can give you based on your info provided. Idk if the player will be able to Flip Flop from A to B and back to A.... because that would be a different setup.

lemme know!

EDIT: Yeah I think I need info on what is happening here gameplay wise.

more ▼

answered Mar 16 '15 at 12:43 PM

avatar image

DG Gage
1.7k 62 31 129

avatar image mdmoberly Mar 17 '15 at 12:47 AM

The actors rotation being set and applied before detach is not an issue. The problem is that I want to see the rotation being applied during the game.

Imagine trying to construct a building. You would need a way to spawn an actor and set its transform before setting/placing/detaching it in the world. That is basically what I am trying to accomplish.

this may help understand what I am trying to do.. Video 1 Video 2

avatar image DG Gage Mar 17 '15 at 07:46 PM

Okay. Give all the details you can of how this gameplay will work and what you want the player to see. I think the problem is that I didn't quite understand your goal

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

I have found a temporary solution to my issue.. I have to set the rotation via Event Tick from mycontroller. I know using event tick probably isn't the best method for this, but it is what I have come up with.

In the meantime I will try to find a way around using event tick. If you're interested this video demonstrates what I was trying to accomplish.

more ▼

answered Mar 17 '15 at 05:05 AM

avatar image

205 13 25 27

avatar image CDMcGwire Mar 17 '15 at 07:28 PM

I think I'm starting to understand what's going on here. You're making an in-game building mechanic, and you want the "preview" wall to rotate while attached and properly reflect the rotation it will adopt when detached.

It looks like the rotation keys only update the rotation that will be given to the wall upon detaching. Perhaps you should attach a "Rotate Actor" function to the "Key Press" events? Thus, instead of the Tick event's constant update setting the rotation, the rotation is set only when the value is changed, but it will be set for both the preview wall and the placed wall.

avatar image mdmoberly Mar 18 '15 at 02:50 AM

Thanks for the reply! I believe I already tried that method, I had that set in the "Video 2" example. For now, I am moving past and just sticking with the Tick event. I will come back to it later!

I've actually come quite far a bit further since then, here is another video example if interested!

EDIT: actually I did not try using Rotate Actor on key press. But I think this result is good enough for now. I am now working on some type of snapping grid that the Actor snaps to. That way the pieces line up better.


(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