Author Topic: Offsetting [Solved]  (Read 840 times)

I am having trouble figuring out how to offset a setTransform or a ContainerRayCast. I essentially want to be able to say
Code: [Select]
%col.setTransform() SPC vectorScale(%obj.getForwardVector(),"5 0 0"); or something like that, and have it transform the %col object 5 to the right of me. I also want to know how to shoot a raycast from, lets say, a brick above my head, as opposed to the eye node.
« Last Edit: January 26, 2013, 01:40:48 PM by tommybricksetti »

I am having trouble figuring out how to offset a setTransform or a ContainerRayCast. I essentially want to be able to say
Code: [Select]
%col.setTransform() SPC vectorScale(%obj.getForwardVector(),"5 0 0"); or something like that, and have it transform the %col object 5 to the right of me. I also want to know how to shoot a raycast from, lets say, a brick above my head, as opposed to the eye node.

If I understand this right, you want to add a position to another, like if a brick was at 0 5 0, you want it to be 0 5 5. If im right, use vectorAdd(position, add).
VectorAdd("0 5 0", "0 0 5") would result in 0 5 5.

If I understand this right, you want to add a position to another, like if a brick was at 0 5 0, you want it to be 0 5 5. If im right, use vectorAdd(position, add).
VectorAdd("0 5 0", "0 0 5") would result in 0 5 5.
Worked. Thanks bud.