Tank Turret Rotation!

Get help using Construct 2

Post » Tue Mar 11, 2014 8:03 pm

I'm still trying!!
B
13
S
4
G
4
Posts: 42
Reputation: 3,967

Post » Wed Mar 26, 2014 4:05 pm

I'm working on at Tank type game myself and even if this scenario is not part of my current project, I decided to take your challenge!

I looked at your tank.capx and your starting with the wrong logic. Part of the answer is in your first post (I put it in Bold in the quote).
fawdda wrote:Hi everyone;
......problem I'm facing is when the turret is rotating and hits a wall or some kind of obstacle, the turret is keep moving and never stops! Any tip around?

Set angle towards mouse will not work, you need to have it rotate towards the mouse.

If you move the mouse very quickly with the set angle condition you will notice how it jerk's to the new angle, but if you tell it to rotate towards the mouse the turret simply change's direction and continues to rotate a the same speed no matter how fast you move your mouse.

Now to work on that obstacle problem.
B
27
S
5
Posts: 17
Reputation: 1,889

Post » Wed Mar 26, 2014 4:59 pm

Well it's not perfect, seams to bounce when colliding with corners but work's well along the wall.

Happy tweaking!
You do not have the required permissions to view the files attached to this post.
B
27
S
5
Posts: 17
Reputation: 1,889

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests