attract object

Get help using Construct 2

Post » Sat Feb 15, 2014 12:49 pm

Hello, I want to do that when the two balls collide they attract, but works in Example 1, but not 2, and it is the latter that I want to get.

first example

In this example just by being near attract

Second example

And here's what I want to achieve, which when touched, will attract, not before.

sorry for the english, it's embarrassing
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sat Feb 15, 2014 2:26 pm

I don't understand your issue. In example 2, it's waiting on a collide, which means there isn't much distance for the object to attract too as they are already touching.

Do you have a capx you can share?
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,667

Post » Sat Feb 15, 2014 3:01 pm

If you want them to "stick together" when they collide ? Try...

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sat Feb 15, 2014 3:03 pm

The problem is that in the first example, before colliding attract, but in the second example but not attract collide ... I want to be attracted when they collided.

Also put part of the first example to the second example, but neither works ... I do wrong?

RamPackWobble I do not want them to stick, I want to be attracted then stick cesarzevil2014-02-15 16:01:20
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sat Feb 15, 2014 7:23 pm

so you have worked out how to do the attracting ? (your part 1 ?)

I have a way to "lock" them together once they touch....

All you need to do is put the stick after your attract...

You might (probably will) need to also turn off the attract once they are together or the force of the attract will start to push them around (I suggest a boolean along the line of

if close enough and boolean "stuck together" is not set then apply force towards the other one

collision ? apply distance joint and set boolean to true.



August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sat Feb 15, 2014 7:48 pm

I have tried everything and there is no way ... I'm going crazy. Are you a private message
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sat Feb 15, 2014 7:59 pm

[QUOTE=cesarzevil] I have tried everything and there is no way ... I'm going crazy. [/QUOTE]

I bet you a pint you haven't and a second pint there is ?

Does your part one attract as you want it to ?

Does the physics distance joint stick them together when they collide ?

If they do work (separately) as you want them to then all you have to do is combine them...

separate events. your part one followed by my suggestion.

try it - if it doesn't work post your capx.

is this what you are after ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sun Feb 16, 2014 9:48 am

In your example attract the balls before they collide and it is just the opposite
When the balls collide they attract not before cesarzevil2014-02-16 09:50:02
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sun Feb 16, 2014 10:33 am

version 2

version 3


I am not sure what you want - in post 4 you said "RamPackWobble I do not want them to stick, I want to be attracted then stick" - which is what I did?

Anyway - let me know if version 2 or 3 are close (I now think it is 3...)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sun Feb 16, 2014 11:26 am

In both examples, I want you to attract and not stick... is similar to the video that you pass.
I'll leave it as impossible thanks
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests