I’m trying to make a laser for the game I’m making. It doesn’t look very convincing though. I have it so there are small “laser chunks” that fire much like bullets, one after another. It creates a pretty jagged line though, especially when I turn. How can I improve upon this and make it look more realistic???
You could use a mesh model, that stays invisible until you hit the fire button…but that could cause issues with the laser going through objects. Other than that, I don’t really know what else, there is probably a way with python and rays, as I think I remember seeing a file awhile ago that did it.
I have done a few laser like things…
just make a plane or a cube,
Scale it the distance you want it wen it is fully fired along the Y axis, and press A to reset rotation and scale.
now in edit mode place the cursor at the the -Y end of your shaft,
pop out of edit mode into object mode, and press the Center Cursor button…
ok now when you scale it along the y axis it should grown and shrink from one point…
start on frame 1 and press I and choose Scale from the menu,
then advance to frame 3, and scale the shaft along the y axis to 0.
for the logic bricks, just do a always, with pulse turned off, and a play IPO frame start 1 to 3…
now when you want to shoot it, just add it to the scene.
It will appear, and then shrink in 3 frames to the gun to simulate charging down.
you will want it to draw on the screen at least 3 frames, so the collision will detect it.
you might want to do your IPO so it scales from nothing, to full scale in 3 frames, then scales back in for a more smooth animation.
Caution: This laser will shoot through walls, and multiple enemies like the railgun in quake 3
also you might want to parent a dynamic light to your player, so that there is a light flash, when he shoots to make it a bit more convincing…
Sparks or a muzzle flash might also be cool to add, is for want a cartoon effect.
Theoretically you could use a large scale IPO and set the the IPO actuator to property and use a scale property that sets it. The value for the property would be set according to the distance between the player and the nearest object in a direction, I know it may be done with some getRayHit() function along with getDistance() but I’m not quite sure.
in this thread , there is a laser file where you can DLD the blend
Hey thanks everyone. I appreciate the help.
Sorry. i don’t know. Please visit the Google site.