When rolling, my ball spins towards the camera

Hello,

I have annoying issue with my ball. When I throw it, it rolls correctly towards the pins but the movement of rotation is towards the camera so it’s quite annoying to watch because your brain (at least mine) says that this is wrong. In the videos Ben’s ball spins forward correctly.

I think this must be issue generating from the game’s physics but I can’t figure out how to tackle it. The issue happens with the drag launch and also with the Perfect Shot button I made which only adds velocity to the z direction so I’m quite confident it’s not caused by anything I have in the scripts.

There are properties of my ball & floor. The ball has child object called “ball render”.

I cant see anything there that would cause the problem you are describing.
I know you said you are confident on that your code works fine however in Unity there is nothing there that would apply a negative rotation to the ball that i can see.
That said i honestly dont remember there being a ball render prefab when i went though the course (This may have been added later in revision as it was a year ago i did this section)
I think the best way to progress is to try and find out where its applying that negative rotation by using Debug logs. (If its not a wierd optical illusion)

What also would help is telling us which version of unity you are using compared with what the lecture has you using. I think its Unity 5 which shouldnt matter (There was a big difference in Unity 4 and 5).
A short video could help if we can see exactly what you are seeing too. A program Ben recommends is called Jing and you it allows you to select an area to capture, choose screenshot or video and upload it from the same software or download it and upload here,

Hope this helps somewhat to tracking the issue and lets see if we can work out whats going on.

1 Like

Hello OP, how are you?
Try adding a little of drag and angular drag to see, or perhaps there is something wrong with the parent/child ball relation, try adding the mesh to the gameObject with the collider and with the rigidbody just to see how it behaves

1 Like

Hello,

Thanks for the tips!

Here’s an update with a Youtube video. I slowed down the ball so you can better see what happens.

  • I use the newest beta version 5.6.0b4.
  • My ball uses .fbx 3D Model I downloaded from the Asset Store (the original ball and pin models made my eyes bleed and I wanted to learn how to use 3D assets bought from the Asset Store.).
  • I moved all the components from Ball_Render child object to the Ball object so I now only have 1 object called Ball.
  • I got an idea to check what happens to the ball in the scene window. Previously I only focused on the game window. The ball object actually seems to rotate properly at the scene window, but the mesh renderer still seems to rotate backwards.

Is there anything that can be done about this? Any ideas?

EDIT: Angular drag/drag doesn’t affect the problem.

I am not sure if thats your issue but its possible its the unity version you are using. I updated to 5.3 and didnt have an issue. I also noticed that not only does it rotate oddly in the X direction randomly you are getting a -1.5 (a value too fast to see) on the y and z axis for a second and it repeats at the same value.

For me thats one of those “Oh wow what the heck is that doing” which isnt very helpful but thats got me stumped other than the differences in the game engine versions.

Thanks for trying to help me at least! :slight_smile: I have had super bad luck with Unity recently and I don’t really want to downgrade because of all the bugs I encountered with the previous versions.

First, after one update all my game backgrounds in every project had scaled themselves to super tiny. I had to add scale of 160 to get them to normal size. A beta came out and fixed the issue.

Then like 1,5 months later I got a new problem where my game worked perfectly in the editor but always crashed with memory access violation error in the standalone build. It was a school project so I really started to freak out. I was so relieved when this current beta came out and it started working fine.

Now this… I think I’m gonna switch to the Unreal course…

One word of warning with Unreal and Visual studio. If you need to reinstall visual studio for any reason make sure you fully remove it and use a cleaner first.
I had a harddrive die on my and because i couldnt uninstall visual studio properly the only drive it would install to was the one that had died even though it was removed from the system (literally unplugged and lobbed in the recycling bin). That hurt me as i ended up having to reformat my C drive and i lost all my unity projects locally as well (I managed to recover some but most were missing bits or broken)

Keep going with the unity course as i am sure someone can help with this.
It may pay to switch the ball back and see if the problem persists.

I re-downloaded the 3D model and re-created my ball object completely and now it seems that this problem is gone for now. I mark this as solved.

1 Like

Was definatly a strange one but glad you got to the bottom of it in the end :slight_smile:
I am looking forward to watching your progress though the course :slight_smile:

If it pops up again try and remember the steps before hand although it could have just been a random glitch in the matrix :smiley:

Privacy & Terms