How do I make an object stay on a solid?

Get help using Construct 2

Post » Fri Aug 28, 2015 3:28 am

I am trying to make an object that falls with gravity and when it collides with a solid it stops. I've tried a bullet with gravity and tried making it collide with my tilemap that is a solid but it is not colliding. The only other option I can think of is add physics behavior to my object and give the physics behavior to my tilemap but that is weird. I don't think a tilemap should have physics.
B
6
Posts: 16
Reputation: 284

Post » Fri Aug 28, 2015 4:49 am

Did you add the Solid behavior to the tilemap AND enable collision with solids in your bullet behavior?
B
83
S
22
G
15
Posts: 1,039
Reputation: 15,219

Post » Fri Aug 28, 2015 11:40 am

I did add solid behavior to the tilemap but I did not add collision with solids explicitly to the bullet behavior. I thought it already starts with the solid collision. I will try adding collision with solids in my event sheet.

So which way is better? Using bullet or using physics? This object can be dragged by the mouse and thrown with the mouse.
B
6
Posts: 16
Reputation: 284

Post » Fri Aug 28, 2015 11:44 am

If I do use events, do I use bullet -> on collision -> stop? Do I have to move the bullet back to the top of the collided object in case the bullet is too fast and goes inside of the object?

If I use physics, do I have to use an event sheet to change the gravity?
B
6
Posts: 16
Reputation: 284

Post » Fri Aug 28, 2015 11:44 am

Physics is not designed to work with the other behaviors - as mentioned in the manual - so if possible, try not to mix, unless you do everything using physics, which has it's own problems.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Fri Aug 28, 2015 11:57 am

Thanks. For now, I have added the physics AND the solid behaviors to my tilemap. Physics handles my draggable object and solid handles my platformer player.
B
6
Posts: 16
Reputation: 284


Return to How do I....?

Who is online

Users browsing this forum: marcinkowski, R0J0hound and 3 guests