How do I make a cross-hair "waggle" ?

Get help using Construct 2

Post » Wed Oct 29, 2014 11:03 pm

Ergebnis...
You do not have the required permissions to view the files attached to this post.
Image
B
63
S
23
G
7
Posts: 1,480
Reputation: 10,796

Post » Wed Oct 29, 2014 11:05 pm

What about

Set X to lerp(Sprite.X, random(Mouse.X-XXX, Mouse.X+XXX), YYY)

and same for Y

XXX - is a distance how far from mouse position it can go
YYY - how fast it should move
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Wed Oct 29, 2014 11:25 pm

Every tick?
Image
B
63
S
23
G
7
Posts: 1,480
Reputation: 10,796

Post » Thu Oct 30, 2014 7:43 am

fldr wrote: it moves aroudn way to fast, like its stuttering (see also attached capx, maybe you guys meant it otherwise then i implemented it [mousewheel to change parameter for duckfaceninja's solution])

You have to tweak them to get realistic movement. Kind of hard to explain, look at capx attached. You have to tweak the parameters to get the movement you satisfy with.
DFNCrosshair.capx
You do not have the required permissions to view the files attached to this post.
B
28
S
8
G
4
Posts: 553
Reputation: 4,914

Post » Thu Oct 30, 2014 1:18 pm

DuckfaceNinja wrote:
fldr wrote: it moves aroudn way to fast, like its stuttering (see also attached capx, maybe you guys meant it otherwise then i implemented it [mousewheel to change parameter for duckfaceninja's solution])

You have to tweak them to get realistic movement. Kind of hard to explain, look at capx attached. You have to tweak the parameters to get the movement you satisfy with.
DFNCrosshair.capx

yeah, now were talking :D
thats what i had in mind! thank you very much!
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Previous

Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 6 guests