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 rotate projectile movement component around a point

right now this object emits circular bursts of spheres that move outward in straight lines away from the center object like so: alt text

They are spawned in like this, where each sphere has a projectile movement component that has an initial X velocity and they are spawned in the middle of the center object with their initial Z rotation changed so they create a circle: alt text

All I'd like to do it make the spheres spin around the center for this reason, but I can't seem to get them to rotate properly: alt text

I was thinking I could just add a RotatingMovement component with these values and it would work, but this does nothing regardless of me checking the Rotation in Local Space checkbox. I thought this checkbox meant when unchecked 0,0,0 means the middle of your map, so if you rotate around that point it will create what I'm looking for, but that is not the case. I also tried rotating around the current position vector * -1 which I thought when using local coordinates would place the picot point at 0,0,0 but that also is not working. Any ideas?

Product Version: UE 4.18
more ▼

asked Feb 07 '18 at 11:09 PM in Blueprint Scripting

avatar image

1 1 2 1

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

1 answer: sort voted first

you could make all the spheres into one blueprint and use the rotate movement component or just add rotation on tick. or when they are spawned attach them to the boss thing in the middle then base the rotation off the center position as the root

more ▼

answered Feb 08 '18 at 12:24 AM

avatar image

10.1k 33 10 25

avatar image thebmxbandit11 Feb 08 '18 at 09:29 PM

neither of those options work for me, I think something is actually just bugged because toggling the "Rotation in Local Space checkbox" in the rotating movement component doesn't change anything for any method I attempt. I don't understand why if I uncheck this box it won't rotate around 0,0,0 in the world coordinate system. I think maybe it just doesn't work combined with a projectile movement component possibly. Not sure what to even try I feel like I've done everything over 6 hours and nothing is working.

avatar image ThompsonN13 Feb 08 '18 at 11:04 PM

just using the rotating movement component on its own will rotate the actor around its root. so unless its root is located somewhere else, the actor will just spin like the earth.

below is a picture of how i accomplished a similar situation but with a known ans set number of items. the one i made previously was an ability that summons fireballs and they spin and move outward in a spiral type shape from the character.

in the example pictured all the fireballs are part of the same blueprint and use the rotating movement component to move around the origin of the actor. the actual script in the picture just makes the fireballs move outward from the center. alt text

capture.png (526.6 kB)
avatar image thebmxbandit11 Feb 08 '18 at 11:10 PM

My issue is with the root location. I have checked and unchecked "Rotation in Local Space checkbox" which makes no difference (prob a glitch) and I've tried changing the pivot point to the middle of the world coordinates and offsetting the local coordinates by getting the bullet actors location vector and multiplying it by -1, so when talking in relation to a local system it will place the pivot at 0,0,0 but that doesn't work. I need more control over the bullets, as in they have to be separate actors and I need to be able to easily set rotation/orbit angular velocity as well as their propagation velocity, but it just will not work correctly using a projectile movement component and a rotating movement component.

avatar image ThompsonN13 Feb 08 '18 at 11:13 PM

another method would be to use the pivot translation. like in the picture below. i used the world origin for this one.

alt text

capture.png (116.8 kB)
avatar image thebmxbandit11 Feb 08 '18 at 11:28 PM

That doesnt work for me though, any idea why? This is my begin play: alt text

This is the rotation movement component: alt text

This is my projectile movement component: alt text


here is what happens in game. How the hell are they spinning like that if I am using a world coordinate for my pivot translation :( I'm thinking this has to just be a glitch?

avatar image thebmxbandit11 Feb 08 '18 at 11:33 PM

changing my begin play to this: alt text gives me identical results whether or not i toggle the Rotation in Local Space checkbox

avatar image ThompsonN13 Feb 08 '18 at 11:42 PM

that worked for me when i tried it without any projectile movement. i cant seem to get the outward movement to work as of yet though

avatar image thebmxbandit11 Feb 08 '18 at 11:44 PM

What are you using in place of projectile movement? because I'm not stuck on using that if there is any other method to simply make the bullets move outward from the boss.

avatar image ThompsonN13 Feb 09 '18 at 12:16 AM

ok so i was totally over complicating things for your situation. for your projectiles you can just have a scene component with a child of the actual projectile bit (cube in the picture below). then have only a rotating movement component (no projectile yet). this will get the projectile bit moving around the scene component. then we just need to add an offset (local Space) on tick.

just got it working and its a heck of a enemy ability. like a meat grinder

alt text

capture.png (108.2 kB)
avatar image thebmxbandit11 Feb 09 '18 at 02:34 AM

This is a lot closer to what I want, but now the issue is since this isn't a velocity it isn't as smooth and the speed at which it moves is now tied to framerate. I think I can use pieces of the stuff you said to possibly make something work though. If i find the proper way to do this I'll update the post.

(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