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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to move Character around a circle

I Every one , after a long research on the AnswerHub , forum , youtube tutorial, and everywhere on the internet i come here to ask your help because im completely out of idea to make ma character move round a circle.

I have try to many think to explain here all test i have do.

So I juste want to move my character ( my character is a spaceship ) around a circle using ( or not ? ) add movement input, the character can just move around this circle and have to not be able to move out this circle.

I have try with :

  • Spline without result

  • With rotation but i can just turn it around himself,

  • With 2 add movement input, one for up and down and the other to turn right left , but i don't know how to make a "pivot point" to be sure that im constraint to this location.

I can't use a Pawn Class because i use many settings in "Character movement component"...

I let you a video of a game who did this because , you will can see what i really want to do.

https://www.youtube.com/watch?v=haehLgNNB4c

I really new in UE4 and i have passed the 4 last days to try it but i'm a little desesperes ....

PS : Sorry for my english im French.

alt text

Product Version: UE 4.12
Tags:
more ▼

asked Jun 17 '16 at 07:43 AM in Blueprint Scripting

avatar image

Cedsphere
1 1 3 3

avatar image jtsmith Jun 17 '16 at 07:58 AM

Sorry for not being more descriptive here, I'm running out of time tonight but thought I would comment to you and say that I think Spline is the way to go here. There are a couple video tutorials I've found before to have a character (AI) automatically follow a spline and I adapted those techniques to my specific needs. Try digging a little deeper into using the spline but if either someone isn't able to give you a full write-up or you can't find a video to help then I will come back tomorrow and write what I can to help you.

Again, sorry not super helpful just wanted to point you in the right direction.

avatar image Cedsphere Jun 17 '16 at 08:12 AM

Thanks for your reply ! So i will try to find some tutorial with AI moving on a spline and try to adapt this !

I will let you now if i find a solution to my probleme.

avatar image Cedsphere Jul 01 '16 at 09:55 PM

I leave here just a message to thanks you , because i succed what i want using spline like you say !

Thanks so much :)

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

6 answers: sort voted first

Hello! Using a point as an origin (you can move that point, along a spine for example), you can offset the player using this kind of trigonometry: alt text You just need to calculate the angle! P.S. Look at atan2 if you want to do the "reverse" thing

more ▼

answered Jun 17 '16 at 09:19 AM

avatar image

Zarkopafilis
335 33 25 45

avatar image Cedsphere Jun 17 '16 at 09:59 AM

Thanks you for you answer ! i will see how i can use this for my projet but i better understand what really are Sin and Cos now ! so thanks a lot !

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

Hello from Argentina, try whit this blueprints whit rotate in 120.0 alt text

blueprint.png (212.4 kB)
more ▼

answered Nov 17 '17 at 05:53 AM

avatar image

Garca
0

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

To be honest if you are trying to a result like the game you linked you are better off using SetActorLocation instead of the CharacterMovementComponent. Or you could attach your character mesh to a spring arm have your spring arm be at the center of your actual actor, then rotate the spring arm.

more ▼

answered Jun 17 '16 at 08:08 AM

avatar image

MOS99Z
326 6 6 11

avatar image Cedsphere Jun 17 '16 at 08:33 AM

I understand your point ! but if i use a spring arm with the mesh, my capsule collision will not move with the mesh right ?

avatar image Olverine Jun 17 '16 at 08:37 AM

If you attach the capsule to the mesh or the end of the spring arm, it will move with it.

avatar image Cedsphere Jun 17 '16 at 09:15 AM

I will try this tonight ( yeah it's 11:14 AM here ^^ )

I will let you know the result !

avatar image MOS99Z Jun 17 '16 at 09:25 AM

Its 5:25 am here lol, Time isn't real, Lunch time doubly so.

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

You want a result like this: YouTube?

I mocked this up real fast doing what I told you. alt text alt text

more ▼

answered Jun 17 '16 at 08:49 AM

avatar image

MOS99Z
326 6 6 11

avatar image MOS99Z Jun 17 '16 at 08:54 AM

Granted you can reverse the direction to your liking, this was just a quick proof of concept. Its a character BP, with another mesh attached to a spring arm, and you can attach a collider to that or to the spring arm as well.

avatar image Cedsphere Jun 17 '16 at 09:34 AM

I will try this tonight and let you know if i can apply it at what i what ! but it's seems to be a good idea ! i have 3 different way to test thanks !

avatar image Cedsphere Jun 17 '16 at 11:48 PM

After many many hour to try to find a solution , i have see that i already this before but the probleme is the capsule component collision that don't move with the character ... i'm really lost with all of this ... i have try to turn off the collision and setup a new one with add collision sphere/box but the probleme that in the character class we need to use the capsule the other collision just not work ... so i juste don't know what to do.

My character have to move by himself forward but no collision are detect so i don't know

Thanks anyway !

avatar image MOS99Z Jun 18 '16 at 02:56 AM
  • All you have to do is make the spring arm the parent of the a capsule collider. alt text

  • I already tested all this and it works fine if you are still having issues i'm sure we can help you get it working, this is a really easy thing to achieve. Here is a video of what I did before but with a capsule collider attached now. Make sure to make the video max quality and full screen or you might not be able to see the collider. I know the collider can be hard to see while hes moving, so I stop moving every so often so you can see that it is still with him.

avatar image Cedsphere Jun 18 '16 at 09:49 AM

I understand your point but the probleme is that the capsule component of a character BP class is the root so he can't be moved to a parent of SpringArm component :(

avatar image MOS99Z Jun 18 '16 at 09:55 AM

... you set that capsules collision to no collision and add a new one... going to have to think outside of the box bit. You had to do the same thing to the skeleton mesh pretty much.

avatar image MOS99Z Jun 18 '16 at 09:56 AM

Or actually just turn off overlap events for the root collider.

avatar image Cedsphere Jun 18 '16 at 10:04 AM

I already try this before it's the first thing i do but we can't add a new collider in a character class we need to use the Root capsule component for collision, if you had a new one she will be ignored ^^'

avatar image MOS99Z Jun 18 '16 at 10:10 AM

Says who? If you are having another issue where the new collider isn't working for detecting collisions we can work through that as well, but don't tell me something cant be done especially something so simple, instead ask how can this be done.... since you want to edit your post instead of replying I guess i'll do the same, my point still stands, instead of arguing with people people learn to ask questions. What your saying about the colliders is still wrong, at this point it seems you are more interested in arguing than asking for help. Good luck with figuring out what you want to do, i'm no longer supplying my assistance.

avatar image Cedsphere Jun 18 '16 at 10:16 AM

Sorry i read this on the answershub when i have try this method, but yeah the new collider detect nothing , i have try all the collision but nothing change i pass through all other mesh

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

If I understand you correctly, it sounds like you should just use some basic trigonometry to move the character around a unit circle. You can then use SetActorLocation to set the characters location around the circle. Let me know if you need further help or if you are unclear on what a unit circle is.

more ▼

answered Jun 17 '16 at 08:24 AM

avatar image

Olverine
71 6 8 11

avatar image Cedsphere Jun 17 '16 at 09:09 AM

Yeah exactly the probleme with this method is when a i have a collision the character will move du to the physics of the character and will be push or move from the original world location and will not be in the good world location of the level i think.

Anyway all help is welcome ! thanks a lot!

avatar image MOS99Z Jun 17 '16 at 09:15 AM

Neither of our solutions will cause that if you have physics turned off. You can even set the actors main componet's Physics: Constraints Locked for Position in all axis.

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

I have try all the solution you all mention here but i just can't success to do work one of her ...

Im really lost and i don't know what to do i don't have any idea :s

more ▼

answered Jun 17 '16 at 11:50 PM

avatar image

Cedsphere
1 1 3 3

(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