Movement with physics vs. adjusting transform.position

I’m in the early stages of a new game, and need help developing the movement. Imagine a donut shaped tunnel (think cyclotron/torus), with objects/enemies that move within the tunnel. The player controls a small ship flying around in the tunnel. What I need is the enemies flying in the tunnel to move in a way where they don’t lose speed, and when they hit a wall, they bounce off and continue moving at the same velocity. Also, when they bang into the user’s ship (currently based on a character controller), they bounce off accurately.

I’ve tried making the enemy objects rigidbodies, applying a force, setting drag/friction to 0, and seeing what happens, but doesnt work well. I also tried to move them just by updating their transform.position, but that gets flukey when they hit walls. And so far, I don’t know what to do when it hits the player’s ship.

So, I was hoping someone on here can point me in the right direction. Physics or no physics? If I use transform.position controls, how do I handle the post-collision movement? Any better ways to handle this I haven’t thought of? Thanks in advance.

Physics would seem to be the easiest way to go. You should make sure that the physic materials you use on the ships and torus have their bounciness values set to 1 (ie, 100% of the collision energy is bounced back). You may also need to use the Freeze Rotation option on the ships’ rigidbodies, otherwise some of the collision energy will get turned into rotation, which you may not want.

I had tried that originally thinking it would do the trick, but after a bounce or two, it still crawls along the border of the lumen. I put a demo up on this page http://www.orgoquest.com/unitytest/temp.html to show whats happening. I should add that although I’m using a torus now, in the future, the idea is that the objects will travel within the ‘tunnel’ that maybe of arbitrary shape, with curves and bends. They will continuously move forward through the tunnel, and when hitting a wall, will direct themselves in a way that they will continue to move forward more towards the center, and not along the wall.

The effect I’m going for can be seen in this video http://www.youtube.com/watch?v=tKgroDE4DHo&feature=player_embedded at the 46-49 second mark and at 1:06-1:07 is what I’m trying to recreate.

thanks for the help!