Hi, I’m working on a simple project where I rotate an object by pressing a button and the ball inside it is supposed to move inside it.
Unfortunately the collision is not working as it should and I don’t know why it is happening.
I have set up collision in Static Mesh editor and everything works as long as I don’t put the object in motion as you can see in the video.
Please help.
Hi, this issue happens because you just rotate the “maze” object and the ball just ends up inside collision, so it snaps to the closes location outside of the collision. I see a few possible solutions:
- Use much smaller rotation steps, for example by using a timeline you could move it 100 times by 0.1 step instead of moving it 10 at once
- Probably much more difficult to achieve, but if you have some kind of a spring arm that is attached to the middle of the maze and the ball, then the ball would follow maze rotation. So you would need to attach ball to the maze, but not directly, but having spring arm between them (I didn’t test it so it’s pure theory )
First solution should be much easier and enough to make this game work for you.
1 Like
Make sure your sphere mesh (in the blueprint that has that sphere mesh) has ccd (continuous collision detection) enabled. Also, smoother rotation of the maze is advisable as mentioned.
1 Like
Thank you for yours advices. Can you please give more details about first solution. How should I setup this timeline solution in blueprint? I’m newbie in UE and I have to finish that project for one of my classes.