Custom Movement - Slow turning

Get help using Construct 2

Post » Fri Aug 05, 2016 8:10 pm

Hey guys

I'm poking with the Custom Movement behavior but I cant make it take sharp turns...there's this lag in taking turns...like physics...can't find the right word... the thing is I can't make it take sharp turns. Any hints?

Cheers!

P.S.

Better yet, I have a perfect movement system with lerp set position, but I can't detect an angle of movement (the movement is done without rotating the sprite)....if I can get the angle of movement somehow....
B
18
S
3
Posts: 65
Reputation: 994

Post » Fri Aug 05, 2016 8:50 pm

Maybe try setting speed to 0 then change direction and add speed back.

For your PS is there a reason why you can't set Angle to Angle(currentPosition.X, currentPositionY, targetPosition.x, targetPosition.y) ?
ImageImageImage
B
44
S
26
G
11
Posts: 520
Reputation: 10,506

Post » Sat Aug 06, 2016 11:16 am

No, I was asking on how to get the angle of movement, not the angle at which the sprite is oriented but I found a work around, by using a sprite object I rotate and use for info, without rotating the sprite i see. It got the job done. Thanks for answering!

Cheers!
B
18
S
3
Posts: 65
Reputation: 994

Post » Sat Aug 06, 2016 3:16 pm

If moving in a straight line to destination then that would be the angle of movement. I haven't looked but would be surprised if there wasn't a property for angle of movement, making it simpler.
ImageImageImage
B
44
S
26
G
11
Posts: 520
Reputation: 10,506

Post » Sat Aug 06, 2016 6:21 pm

Sprite.CustomMovement.MovingAngle
ImageImageImage
B
44
S
26
G
11
Posts: 520
Reputation: 10,506

Post » Sat Aug 06, 2016 9:54 pm

Hey, thanks. Works like a charm.
B
18
S
3
Posts: 65
Reputation: 994


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests