how use drag drop with physics correctly?

Get help using Construct 2

Post » Tue Dec 04, 2012 11:19 pm

I am trying move objects that have physical and drag drop behaviors, but they don't respect the collision, they go beyond the object. somebody could help me (I am using google trasnlate).shimo2012-12-04 23:20:33
B
14
S
4
G
2
Posts: 109
Reputation: 2,679

Post » Tue Dec 04, 2012 11:26 pm

I have done this many of times in C2, if you want a very realistic feeling to it with weight etcetera, you would use applying a natural realistic force towards the cursor, for a snap-to method it get's more complicated, but I'm more than sure it's possible. Not tried a snap-to method though, I like the more 'weighty' realistic feel to it, like a ragdoll.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Wed Dec 05, 2012 12:20 am

Ok I used apply force towards position with the cursor and worked well to my purpose.

tank you . shimo2012-12-05 02:47:55
B
14
S
4
G
2
Posts: 109
Reputation: 2,679

Post » Wed Dec 05, 2012 2:11 am

Lol, that's his signature, it has nothing to do with that
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Wed Dec 05, 2012 10:20 pm

I've had the same issue with my game. If I understand what you did correctly, it will not give you a very good result. What I did what every frame, I would set the velocity of the object towards the cursor, so whatever velocity the object had before does not matter. You can also set the speed the object goes to the cursor by multiplying the number you set the velocity to by how many times faster you want the object to move. By the way, please do not edit your posts to take out something you said that someone replied to. It makes the replier look stupid.
Thank you!
B
7
S
2
G
1
Posts: 44
Reputation: 1,415

Post » Thu Dec 06, 2012 6:49 am

http://www.scirra.com/forum/your-c2-tests_topic41840_page33.html


i have here a lil drag drop example ..with physics ...and collisions

capx and a demo online


B
30
S
6
G
4
Posts: 108
Reputation: 5,602


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests