Path behavior acceleration

For questions about using Classic.

Post » Sat Nov 05, 2011 7:06 pm

Hi i use behavior path but i need set acceleration. I have velocity and in event sheet set vhen is velocity higger than max speed then set max speed. but it does not work, pls help this is important not as previously questions.....
thx for reply
B
25
S
4
G
2
Posts: 318
Reputation: 2,471

Post » Sat Nov 05, 2011 7:42 pm

I haven't used path behavior but to make something accelerate with a max speed a simple formula is    speed=clamp(speed+accelerationamount,0,maxspeed)
Spriter Dev
B
94
S
21
G
12
Posts: 3,250
Reputation: 16,710

Post » Sat Nov 05, 2011 10:55 pm

I think velocity is constant, so you will have to set it to zero once your max speed is reached.
Image Image
B
164
S
49
G
114
Posts: 7,668
Reputation: 79,535

Post » Sun Nov 06, 2011 7:41 pm

I don't understand the question. You can set the acceleration with an action. What doesn't work? Or what happened and what did you want to happen?

You can limit the max speed with clamp like this:
+ Always
-> Sprite: Set Path Speed to clamp(Sprite[PathMovement].GetSpeed, 0, 'maxSpeed').

Also keep in mind that acceleration is directional. Positive acceleration accelerates toward the end of the path, and negative toward the beginning.
R0J0hound2011-11-06 19:43:35
B
84
S
27
G
70
Posts: 4,934
Reputation: 49,560

Post » Mon Nov 07, 2011 3:42 pm

Ok thx i try it and then i will write
B
25
S
4
G
2
Posts: 318
Reputation: 2,471

Post » Tue Nov 08, 2011 4:25 pm

I solved it, i had a fail i change acceleration and velocity, but thx :)
B
25
S
4
G
2
Posts: 318
Reputation: 2,471


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests