How do I collide with Tiled Background?

Just started using Construct 2? Post your questions here

Post » Tue Aug 25, 2015 5:10 pm

I have a sprite with Physics behavior added and also a Tiled background with Solid Behavior enabled.

The Sprite also has the Bullet behavior. I want to have the sprite stop moving when it hit's the Tiled Background (It's a wall). By default it just flies right through it; also it appears I can make the sprite bounce off the all, but I just want it to stop.
B
5
Posts: 18
Reputation: 261

Post » Tue Aug 25, 2015 6:04 pm

The bullet behavior and the physics behavior don't influence each other as far as I know.
You'd have to create an event that tests if the sprite has collided with the wall, and set the velocities to 0 accordingly. You may even have to push the sprite back out of the wall. I know the custom movement behavior has events to push out of solid objects.
B
43
S
19
G
65
Posts: 1,098
Reputation: 37,933

Post » Tue Aug 25, 2015 10:35 pm

Thanks for the feedback. I switched to the 8 direction behavior and added a simulate direction and that had the desired result.
B
5
Posts: 18
Reputation: 261


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests