Is it possible to move a vertex group without using an armature? I’m trying to make lasers that have their “endpoints” always at the ship’s target’s position… but am having a bit of difficulty. I tried experimenting with mesh.getVertex() but it appears that the setXYZ method isn’t accurate to world coords?
Any tips/suggestions? Here’s a few screenshots to better explain what I mean
As you can see, the endpoints don’t meet up with the target
Much simpler is to scale the complete laserbeam. Ensure the origin is on one end of the beam mesh and the length is 1.0 when scale is 1.0 (along the length axis).
You can even do that with an action:
keyframe 1 = scale 1.0 (along the length axis)
Keyframe 2 = scale 2.0 (along the length axis)
Set the curve to extrapolation extension (Curve Editor).
Play in property mode. The size will be according to the property value
The advantage is you do not need different meshes for different beams.
great idea! but how would you figure out how much it needs to be scaled? (currently I use distance formula to figure out where to put the endpoints) but distance formula wouldn’t apply correctly to scaling (that I know of? I suppose i can give it a try).