How do I give objects or sprites an limitation.

Get help using Construct 2

Post » Sat Mar 15, 2014 12:24 am

I wounder how to limit objects' movement, or give its movement a range. like rang(xx,xx) or speed !< xx
In my case, I want to let the object rotates until a certain angle, and then let it stop.
B
3
G
1
Posts: 5
Reputation: 310

Post » Sat Mar 15, 2014 1:19 am

If angle <= angle you want - "angle to increase" / increase angle by this value.

Example:

You want it to rotat until its angle is 270°. You rotate it by 10°.

If angle <= 270-10° / angle +10°

If the angle is 260° it will add 10° and then stop.
B
10
S
2
Posts: 135
Reputation: 1,090

Post » Sat Mar 15, 2014 5:08 am

Thank you Alyra :D


Alyra Games wrote:If angle <= angle you want - "angle to increase" / increase angle by this value.

Example:

You want it to rotat until its angle is 270°. You rotate it by 10°.

If angle <= 270-10° / angle +10°

If the angle is 260° it will add 10° and then stop.
B
3
G
1
Posts: 5
Reputation: 310

Post » Sat Mar 15, 2014 5:38 am

@Ziteng You're welcome.
B
10
S
2
Posts: 135
Reputation: 1,090


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests