How do I lock the angle of rotation at a certain degree

Get help using Construct 2

Post » Wed Mar 26, 2014 11:50 am

I wasn't able to open LittleStain's file since it was made with a Beta version of C2, so maybe you already have a solution you like. If not here is a 2 line solution.

Basically I have the system check every tick to see if the angle between the sprite and the mouse is within a range that I specify. If it is I update the angle of the sprite. So as the mouse moves out of range the angle of the sprite is no longer updated and left at the last angle instead of snapping back to 0 as in my previous example.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Wed Mar 26, 2014 12:36 pm

shirokuma wrote:I wasn't able to open LittleStain's file since it was made with a Beta version of C2, so maybe you already have a solution you like. If not here is a 2 line solution.

Basically I have the system check every tick to see if the angle between the sprite and the mouse is within a range that I specify. If it is I update the angle of the sprite. So as the mouse moves out of range the angle of the sprite is no longer updated and left at the last angle instead of snapping back to 0 as in my previous example.


Haha, you've just proven myself and aphrodite wrong.
We were concerned the negative angle wouldn't work as expected, but seeing your example it does.
:D
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Mar 26, 2014 6:43 pm

:D Thank you all for providing me the solution to my issues. I will definitely make a good game thanks to your help...
B
5
S
1
Posts: 16
Reputation: 408

Post » Wed Mar 26, 2014 7:15 pm

I'm looking forward to playing it. :)
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 36 guests