How do I make a bat swing and return it to original state

Get help using Construct 2

Post » Thu Mar 23, 2017 8:10 pm

Dear all,

I've been working on my first gaming attempt. It's basically pong with baseball bats. The idea is the you can swing your bat and therefore accelerate the ball. Everything is basically working except for swinging of the bat.

I want the bat to swing (approx. 270degrees) and then after 2 seconds return (wait function) to the original position.
how do I do this?
B
4
Posts: 2
Reputation: 209

Post » Thu Mar 23, 2017 9:12 pm

Are you using physics or bullet behavior for the ball and bats?

You need to use Rotate towards angle 270 and then a wait to pause and then rotate back to original angle.

If you are using physics you would need a limited revolution joint that rotates to an angle with impulse and force to return it to it's former angle.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Tue Apr 04, 2017 2:12 pm

aah thanks lamar! I am using the physics approach, so i'll look at the limited revolution joint!
Appreciate it
B
4
Posts: 2
Reputation: 209

Post » Tue Apr 04, 2017 2:18 pm

corjan wrote:aah thanks lamar! I am using the physics approach, so i'll look at the limited revolution joint!
Appreciate it


Yes- limited revolution joint and you may need to step the inclinations to get it to contact the ball properly.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790


Return to How do I....?

Who is online

Users browsing this forum: richardfu and 36 guests