I’m new in here and I’m just starting to learn Unreal and I’m stuck since a week with a simple problem… I really hope you guys can help me in here, or I won’t have any hair left ^^
I tried to create a rotating ball character (moving with physic) that would have an optionnal attached ring pivoting around.
Basically the ball is supposed to roll depending of the movement input (this part is alright ^^’) but the ring would always face the aiming point (controller Yaw and pitch Input).
My issue is that I only found a way to control the Ball AND the ring with physics. Or the ball OR the RIng with character Movement and animation but not with physics.
Any Idea on how I can force the Ring to move with the ball (location) and to not follow the ball’s rotation when it’s rolling ?
Thanks in advance, for your help or your time !
If I understood…you want the ball to freely roll by physics but you also want a ring attached to it with independent oritentation/rotation…that is not hard
You have the BALL mesh component (with physics and roattion) that is child of default scene root.
then you have the RING component…
you just have to avoid attach the ring to the ball…just update the ring position to ball position
in event tick or whatever do:
Hey, I just wanted to share a few general tips since you mentioned you are new (and in process of pulling hair out):
If having trouble with something, try to explain it out loud (even if nobody is there to listen). Explain it in as dumb, simple caveman language as you can. For example:
Ring should follow ball.
Ring should not rotate around ball.
Ring is rotating around ball. Why?
I know it sounds dumb but really trying to simplify as much as you can will help avoid the danger of over-complicating which can lead you down very stressful rabbit holes :).
One other tip - sometimes to explain something with text is very confusing, but a few pictures or even video/gif can make it immediately clear what you are trying to do. That may help make it easier for others to understand your problem.
(it can be frustrating to try and explain something for hours to another person, only to finally realize they don’t know what to do either once they’ve properly understood you)
Now, to the actual question: I think above poster nailed it, assuming we understand you correctly.
Since you want the ring to follow the balls location but not rotation, don’t make it a child and on tick you can set its lcoation to follow the ball. A few concepts to look further into are parent > child relationships, and local/relative versus world coordinate space.
Thanks for you help and tips ! My question was indeed not the cleareest ^^
So I’ve tried your solution, but from what I understand I would need to trigger this “action” every tick in order to keep it at the right place. First it seems to work but, when I do this, the Ring location isn’t really fixed to the ball it move a bit when I roll fast :
(it seems I’m too new to put include a media, so I download a video below)
Just to be more clear following your last tips, here is the closest result I could get before (it’s not directly attached because I want to be able to spawn the ring on an event when this issue will be resolved).
Thanks again for you help with this, I tried to look for a solution on tutorials and this forum but couldn’t find anything.
eldany.uy has demonstrated a solution. I just add a tip for why your initial attempt wasn’t working:
When you use the AttachComponentToComponent node, you are creating a parent > child relationship. That means the child will inherit the transform of the parent.
Transform = location, rotation, scale.
Thanks, that will help a lot ! that seems perfect. Now I need to learn a few things in order to understand exactly how it works, specially the scene component but your video will defintely guide me through my next steps !
@BIGTIMEMASTER Thanks for the additionnal tips. It’s indeed what I thought, but I believed I would found a simple way to dissociate one of this three parameters ^^ (Rotation)
A scene component is just a pivot in the scene…it just stores a transform. Consider it as a mesh without the visual part (the mesh lol). Pivots are fundamental for making composited transforms…actualy I think a static mesh component is a child of a scene component.
It helped me a lot to get cleaner blueprints ^^
However, I think I’ve been to fast to marked this issue solved. After a few test, it seems this doesn’t finally solve my issue. I haven’t first seen the issue on your ball character as yours move slower and you added the rotating movement, but I believe we get the same issue now that I watch it again.
When the ball move with force, it has a little offset, and this caused the “ring” to not be centered with the ball.
Do you have any Idea on how to get them both centered even when we go fast ?
Tick group POST PHYSICS in the ring actor.
Thanks man, You helped me a lot, it works, and looks good !