Move at same angle (regardless of speed)

Get help using Construct 2

Post » Thu Aug 29, 2013 3:45 pm

Hi all,
I have a small issue with the game I'm working on. I've tried searching the forums but can't solve it....

Basically I have a 'mover' sprite with Bullet Behavior.
As the 'mover' bullet moves it spawns another object behind it (to create a solid line).
As it moves I am currently adding to the Bullet Angle of Motion (to create a solid line curve across the screen)

Now, I want to move the 'mover' sprite at one of three different speeds, but have the curve it produces to be the same (regardless of the bullet speed).

Can someone help!

I've attached a basic capx illustrating the problem. If you press the 1, 2 and 3 buttons you can see that the curve is different depending on the speed of the mover sprite. How can I make the curve the same every time?

CAPX:
https://dl.dropboxusercontent.com/u/165337138/angle_bullet_problem.capx

B
4
S
1
Posts: 12
Reputation: 985

Post » Thu Aug 29, 2013 5:16 pm

You must make the speed in which mover sprite change angles proportional to the speed the mover is traveling. Change event 4 to something like:



and it should be much closer to what you're looking for. It probably won't be perfect due to minor fluctuations in DT, but it's pretty close.
B
62
S
19
G
8
Posts: 341
Reputation: 12,075

Post » Fri Aug 30, 2013 9:53 am

Thankyou Zatyka, I'll try it. It was doing my head in, my brain froze when trying to work it out before :-)
B
4
S
1
Posts: 12
Reputation: 985


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], SputnikCZ and 3 guests