getAxisToVect() problem

i’m trying to create a laser pointer.
the laser’s x axis points towards its parent’s x axis

laser.alignAxisToVect(COORDINATES, 0, 1)#align x axis to where the pointer points

now the laser’s z axis points at the camera’s location

laser.alignAxisToVect(campos, 2, 1)#align z to cam position

it works perfect if the laser pointer is at the center of the world. but if you move the pointer and the laser, it will still inherit the center of the world as its position. <<== meaning it faces the camera but its back is pointing at the center of the world.
what i’ve done for the meantime is, i have 2 planes positioned like a ‘+’ so it wouldn’t look like a flat plane when you look at the side.
same problem goes for the particle system that i’m trying to make. the particles should face the camera while rotating its face. help badly needed :frowning:

I’ve also done my lasers with + structure and I see nothing wrong with the solution.

Particles can be just aligned to camera for example Z and then rotated by rotating around the same local Z axis.

hmm, so maybe there’s no solution? <br>i already have a technique for the particles, but i wanted to make this alignAxisToVect() thing working<br>because it can help me build more better particles and effects. for example light ray/sun rays without using GLSL.

it should rapresent a vector(direction) not a point in global space

for that usually you have to do:
vec = obj.getVectTo(target)[1]

well i just named it “coordinates”, but it is actually a worldPosition of a camera – active_camera.position
i tried it marcoIT. i’m too dumb i didn’t think of using getVectTo haha. thanks it’s now working i think.
i still have a lot to learn when it comes to programming. thanks again!!
when i finish this, i think i’m gonna upload a laser template on the resources :slight_smile: