How do I set an object to orbit a point ?

Get help using Construct 2

Post » Fri Mar 13, 2015 4:55 pm

First,sorry for my English.
Now in a game,I must set a tennis racket to rotate it from 0 degrees to 90 degrees(to hit a ball to left screen).But when i used method "rotate clockwise",tennis racket rotate depend on basic image point(Image point 0-center of racket image)-not from hand player(i have a sprite-"tennis racket"-a tennis racket and a hand that hold this racket).
So if i want to set that racket will orbit hand that hold it,how can i do that?
My config:
Touch:On tap gesture>Sprite7(tennis racket):rotate 90 degrees clockwise
B
6
Posts: 31
Reputation: 312

Post » Fri Mar 13, 2015 5:44 pm

i would set the racket to the position/angle on the hand you want it to be, then pin racket to hand (angle&position)
this way you can rotate the arm and the racket will follow like it was held by the hand
B
37
S
11
G
5
Posts: 485
Reputation: 5,315

Post » Sat Mar 14, 2015 3:29 am

you can give me an example for this config?I `m not sure what you mean but i can not find any "angle and position" method in Construct?
B
6
Posts: 31
Reputation: 312

Post » Sat Mar 14, 2015 4:04 am

You have to add the Pin behavior to the object and, in the events, choose the object and choose "Pin to an object".
B
49
S
19
G
3
Posts: 588
Reputation: 6,209

Post » Sat Mar 14, 2015 10:48 am

You can also edit the image points. set origin to the lower middle of the handle.
B
9
S
2
Posts: 80
Reputation: 854

Post » Sat Mar 14, 2015 2:33 pm

Thank all of you,but even if the racket orbit hand that hold it,it is fast to rotate.However,we can not say that means:"we hit the ball".
So how I can decrease the speed of this rotate,to look like "we hit ball"?Or we can use other method to do that?
More
B
6
Posts: 31
Reputation: 312


Return to How do I....?

Who is online

Users browsing this forum: ling200916, ridhoemgl and 6 guests