How do I make CM rotation stop on collision with obj corner?

Get help using Construct 2

Post » Tue Jun 13, 2017 11:08 am

Image

The picture explains it quite well. I am using Custom Movement to achieve realistic car moves, but when you press [D] to turn the car right, for example, instead of stopping upon collision, the car sprite pushes itself farther from the wall and continues to rotate.

Is there a way to prevent this (Physics behavior's "friction" did not do it) without adding 3 transparent blocks to sense walls on every side of the car?

Thanks in advance. :geek:
B
6
S
2
Posts: 97
Reputation: 1,332

Post » Tue Jun 13, 2017 5:34 pm

Updated the title so It is less naive; any help still appreciated
B
6
S
2
Posts: 97
Reputation: 1,332

Post » Fri Jun 16, 2017 2:40 am

2 options:

1. Create your own movement behavior entirely with events.
2. Use one of the physics behaviors (either the built-in or Chipmunk).

I have been using prebuilt physics behaviors quite a bit lately, and am pretty happy with how they work. They also have the advantage of handling car-car collisions automatically.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
46
S
12
G
20
Posts: 363
Reputation: 14,299


Return to How do I....?

Who is online

Users browsing this forum: alextro and 7 guests