[ask again] two object pass trough another

Get help using Construct 2

Post » Wed Jun 20, 2012 1:37 pm

guys how i able to make an object can't pass trough another object

here's the case
im making two char object moving with the mouse / object follow mouse and i want every time the object1 which the one i move with mouse collide with object2 the object2 stay still and prevent the object1 to go any further.. just like a solid rock

i tried using physic on my objects but when the object1 collide with object2 it always make object2 move or thrown away.. like there is a force from object1 causing it.. i tried set my object elasticity to 0 but it seems no effect on it

i using solid behavior also and deleting my physic behavior i use solid on two of my object and the result is object1 pass trough object2 like there's no mass or density..

i hope anyone can help me with this problem


thanks before       
B
5
Posts: 10
Reputation: 545

Post » Wed Jun 20, 2012 2:24 pm

Did you set object2's physics parameter 'Immovable' to 'Yes'?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jun 20, 2012 4:00 pm

[QUOTE=Nimtrix] Did you set object2's physics parameter 'Immovable' to 'Yes'?[/QUOTE]

no i set immovable to "no" if i set 'yes' the object pass trough it
i set density to 500
B
5
Posts: 10
Reputation: 545

Post » Wed Jun 20, 2012 4:43 pm

you should just set object1 to immovable "no" and object2 to "yes"

but i dont understand, you are moving both object with follow mouse? than this will override everything and physics wont work,

providing a capx is always handy to see what you are doing

ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Wed Jun 20, 2012 4:51 pm

does this come close to what you want?

example
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Tue Jun 26, 2012 4:39 am

Hi vtrix heres my example

i actually have 2 object character and moving by a click on the objct and the object sprite will follow mouse i set this on both objct character if i click on of the sprite then the object follow to mouse x or y, problem is seems the physic won't work with this and both object sprite keep pass through each other...

my examplestev032012-06-26 04:49:02
B
5
Posts: 10
Reputation: 545

Post » Tue Jun 26, 2012 4:54 am

is there any change for construct to create multi character sprite?
i mean more than 1 character objct? moving alternately depend on time we click
B
5
Posts: 10
Reputation: 545


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests