Stop space ship from moving after crash.
Hi!
I use force to move the ship forward. When I crash, I disable the controller and the force and make the ship invisible, but it's still moving a little bit. Is there a way to stop it from moving at all?
-
Hi, I'm afraid not. You will only get a result on the impact sensor after the physics system has resolved the collision and possibly moved your ship in an undesirable way. One common workaround is to disable collision on the ship completely and use a triggerzone to detect the intersection between your ship and the obstacle. This has the opposite problem that your ship may appear to go through the objects slightly before crashing. A work around for that is to make the triggerzone move ahead of the ship slightly by the distance that your ship will cover in the next frame. Then you can guess whether the ship will collide on the next frame and react as needed.
Hope that helps
Matt -
As in it sort of coasts forwards a little? If so, try adding a mover to it. Set its speed to zero (this part won't do anything by itself), and set its damping to 100% (this part does something). Damping is the gadget's ability to slow the object to the desired speed. So when powered, this will slow the attached object to the desired speed. Up the strength also to make it better able to affect the object's speed.
-
Hi!
Ok. Is it hard to make this possible in the future?
I know that to deactivate the ship will make it to stop. Not make it invisible, but turn it off, but then there will be some other problems. For example, the Imp will exit the controller sensor. And the camera trigger will no longer detect the player. I have some ideas how I can solve it. I will see what I can do. ? Thanks for the help.
Now I need to check the new update. ? -
Supposer: It worked with a mover. I set speed and movement strength to zero and damping to 100 %. Things starts to work very well now. ?
-
Hey Bogdan and Matt - thanks for that reply. It is the answer to something else I had posted about. I had tried to cheat that using tags but as you say the collision detection causes a quarter second or so of lag. Thanks.
iniciar sessão para comentar.