Switching off collision detection?

As i really like Socials FPS setup and especially Ven0mSevenX Sci-Fi level. I want to add something to these community releases. I made a pulsating laser shader which can be changed in colors and pulserate. It sends small rings from the rifle to the target. I already made the shader, however i was wondering if there is a possibility to switch off collision detection for the cylinder object which carries the rings from the muzzle to the target. Visibility is not a problem as i can switch it off in the shader. Or alternatively, maybe better insert an object between muzzel and target during the time you shoot. If someone has a solution that would be fantastic as it’s really looking cool. However this will require an SM 2.0 card.

Make it ghost if you don’t want it to collide physically with other objects. If you want do disable all collision detection in that object, go to edit buttons and face mode (f) then select all the faces (a) and turn off collision button. After that press copy drawmode.
It would be nice to see that shader in action - maybe you could post some screens or .blend?

Thanks for the superfast answer. I will do that and publish the blend with some info to use it on arbitrary objects. This way we might find someone with a better solution which does not penetrate the target object anymore.

I suggest you put an empty in front of the barrel with ray sensor. Then determine hit position with .getHitPosition() and move the other end of the cylinder vertices to that position. Though I’m not sure if it works with your shader. At least the mesh should deform.

it should work as the shader is a mere material. I parented it to the recoil empty and when i hit p it goes astray. Your other proposal sounds like the way to go, I will try it. Maybe you want to have a look at the blend, to better understand the problem. I made a copy of the cylinder hovering under the ceiling and linked to the trigger. At least you can watch the effect this way, even if the muzzle cylinder almost vanishes in the wall.

i forgot to mention: i am using Erwins preview Nr. 14:

http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=blender-2.43-preview14_postRC1-win32.zip

I checked your .blend with that same preview build. Actually it looks like you have not parented the cylinder to the recoil empty as you said. Instead the gun is parented to the cylinder.

You should parent the cylinder to the gun and remove the collision attribute from all of its faces. Then make a new empty in front of the barrel and parent it to the gun. Make it fire a ray, then check the hit position with script and move cylinder’s other end to that position. It can be little tricky to move so many vertices and still retain the cylinder form.

This way the laser won’t continue past the first object and will hit only the first object it collides with. Hopely that made some sense… The shader itself looks nice. :slight_smile:

Hei, terve! Kiitti, ultracool, your detailed description worked straight and like a charm :slight_smile:
I will open a new thread to publish it.

Heh, you don’t usually hear much Finnish spoken outside of Finland. Nice to hear it worked. Maybe you didn’t yet try moving those vertices? That’s where it gets complicated, although if you can program shaders you can probably handle those calculations too.