How do I drag object to collide with a solid

Get help using Construct 2

Post » Tue Jul 14, 2015 5:51 pm

Hi,

I have a drag and drop object that I can click and drag anywhere however I can drag right through solid objects eventhough I set both objects to solid.

How can I set the object to collide with another object when I drag through it?

Thank You.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Wed Jul 15, 2015 6:22 am

I THINK (emphasis on think) that you may need to make a workaround using the "move towards" function instead of the drag and drop behaviour. What I mean is, rather than the drag and drop behaviour, implement events that essentially execute logic similar to this:

While mouse is down
move object towards mouse.x,mouse.y,

That way clicking (and holding) can simulate drag and drop capabilities (especially if you adjust speed and such so that it does so quickly), but it still should interact with solid objects.

I hope this helps some. Good luck with your project! :)

Regards,
Gideon. :)
B
10
S
1
Posts: 72
Reputation: 1,015

Post » Wed Jul 15, 2015 4:28 pm

Thank You GideonG.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Thu Jul 16, 2015 6:06 am

No worries. If you run into any trouble with that, I can try an make a .capx showing what I mean. Good luck! :)
B
10
S
1
Posts: 72
Reputation: 1,015

Post » Thu Jul 16, 2015 6:54 pm

ok thank you.
B
24
S
4
Posts: 78
Reputation: 1,308


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests