How do I center a object inside another without shaking?

Get help using Construct 2

» Fri Dec 18, 2015 4:51 pm

You hold a button and it applies force to object 1 towards object 2, once overlapping object 2, object 1 slows down until centered inside object 2. That's what was suppose to happen, but once it centers it shakes allot.
I do the 'apply force' for the button and 'set velocity (0,0)' and 'set angle 0 degrees' for overlapping. Keep in mind object 2 moves a little, but even when still object 1 shakes like crazy.

What am I doing wrong and or how do I fix this?
Last edited by MorrisFeldman on Sat Dec 19, 2015 12:58 am, edited 1 time in total.
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Fri Dec 18, 2015 6:23 pm

When the object is centered on object 2 stop applying force and set the position to it to be exact. There is the event set position to another object. It's shaking because when it moves to the center to the other object it overshoots it a little so it moves back and forth constantly.
Banned User
B
6
S
3
Posts: 105
Reputation: 1,170

» Fri Dec 18, 2015 9:55 pm

These might be too many questions but I don't feel like making another thread so...
How can I stop object 1 from overlapping with immovable object1s on the same layer when centered on object 2? How can I tell if it's centered? And is there a way to make it turn to a 0 degree angle and stop there with angular velocity(moving smoothly to the angle)?
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Sat Dec 19, 2015 9:27 am

Bump.
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Sun Dec 20, 2015 1:34 am

Bump
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Sun Dec 20, 2015 2:54 am

Maybe you could explain in a better way what you would like, for I don't understand the question..

Would it be possible to share a capx, maybe?
Or you might consider drawing an example..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

» Sun Dec 20, 2015 2:59 am

Hold on I'll make an example capx.
Last edited by MorrisFeldman on Sun Dec 20, 2015 3:35 am, edited 1 time in total.
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Sun Dec 20, 2015 3:33 am

Nevermind, here's the full capx I need to know how to check if its centered inside cursor sprite and how to turn it to 0 degree angle smoothly through physics angular velocity action or something with a 60 fps animation like so.

https://filetea.me/t1sgZ5xhPMLTlyrzYc8rRb2Xw
https://infotomb.com/tkk4p/50f5bebafc49 ... 74e0ff4ec9
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

» Sun Dec 20, 2015 12:41 pm

MorrisFeldman wrote:Nevermind, here's the full capx I need to know how to check if its centered inside cursor sprite and how to turn it to 0 degree angle smoothly through physics angular velocity action or something with a 60 fps animation like so.

https://filetea.me/t1sgZ5xhPMLTlyrzYc8rRb2Xw
https://infotomb.com/tkk4p/50f5bebafc49 ... 74e0ff4ec9

I have no idea what to do with the capx..

Something like this?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

» Sun Dec 20, 2015 10:41 pm

Yes but moving its angle to 0 as well and both with a smooth transition instead of some sort of teleportation like shown in your file.
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

Next