x

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"

Rotating an Actor Around a Custom Pivot

Currently, I have a 2D sprite outline of a rectangle, with an actor in the middle, and I'm trying to get the rectangle to rotate around the actor. It seems like installing a Rotating Component on the sprite would be the easiest solution. However, the sprite rotates around the center of itself independently of the actor, and I can't find a simple way to change the origin of the rotation to the actor's world position instead of the sprite's center location. My blueprinted attempts to change the location of the Rotating Component just make the sprite randomly jump to different positions in the level. Any way to accomplish this?

Product Version: UE 4.7
Tags:
more ▼

asked Jun 09 '15 at 10:13 PM in Blueprint Scripting

avatar image

PolarisInParis
51 3 7 9

avatar image Enlo Jun 10 '15 at 01:00 PM

Why don't you just set the Pivot Translation on your Rotating Movement Component?

Rotating Movement Component

avatar image PolarisInParis Jun 10 '15 at 01:17 PM

The location of the actor changes during gameplay, so I can't use a hard-coded number as the rectangle's center. I tried to see if you could set the Pivot Translation via Blueprints, but I couldn't find anything.

avatar image Enlo Jun 10 '15 at 01:35 PM

If you set rotation in local space to TRUE, it will rotate around it's own center (aka pivot point), regardless of where it is currently located. It will move just fine and keep rotating around it's center.

If you attach your rotating actor to the character, it will rotate around it. Also, you can change the values of the rotating actor using blueprints (get actor -> get rotating component)

avatar image GhostRavenstorm Feb 25 '17 at 05:54 AM

I too want to know this for treaded tank movement.

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

0 answers: sort voted first
Be the first one to answer this question
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