Boosted snowboarder seems to rotate

When I do the boost, either he gets narrower due to approaching the speed of light, or the 2D snowboarder image is rotating slightly sideways. Since he stays that way when he returns to normal speed, I am betting it is due to rotation for some reason.

Not sure how that happens though, since the only thing being changed is the speed value for SurfaceEffector.

My code matches what was in the lesson, except for using 15.0f as my base speed.

Any ideas?

Hi Ivskiprof,

Could you please share screenshots of what you see in Unity? I’m also interested in the player’s transform when he gets narrower.

Nina,

Sorry I couldn’t reply to my original post before it got closed.

I captured a video that shows the issue, but I don’t see how I can attach it here. It only accepts image files. Can you suggest how I can share this to you?

I noticed that it is actually distorting somewhat during the normal movement, but it does it more when I press the Up Arrow cursor key. They video makes it more obvious than a still image would.

Mike

Hi Ivskiprof,

Welcome back. I re-opened your thread and moved your post here. :slight_smile:

Regarding your video, if it is very large, you could upload it to Youtube and share a link here. Other students upload their videos to, for example, OneDrive and share a link.

Thanks Nina. The problem was that my old work email was where notices were being sent. I am working with the support group to get that changed. That is why I missed your replies earlier.

I had OneDrive, but it wasn’t set up for my account, so it is syncing now. Once that is done I will put the link in for the MP4 file.

Here is the link: https://1drv.ms/v/s!Ar9oS0hb0FiFh_RqVO6nV5dn-eLP5g?e=o86Gww

Thank you for the video. That was helpful. Barry looks as if he rotates around the x- and y-axis. In our game, he is supposed to rotate around his z-axis only.

Click on the Barry game object, then go to his Rigidbody2D component. Under "Constraints > “Freeze Rotation”, make sure x and y are ticked.

Did this fix it?


See also: