Arrow helper and raycast without bvh

i am new bie here
usin arrow helper with origin

direction expectd to be horizontal

i wanted to use raycastin two objects without bvh \ for plain mesh

@PavelBoytchev @Lawrence3DPK

(post deleted by author)

Now it is horizontal:

Origin is above, at rect at right\ side
Mean\hile it uses origin Vector(0,0,0)

@PavelBoytchev

Knot in 2008 when forums matters over API

Do I may to help with dev? To work it out of box

Draw AxesHelper. If the arrow is parallel to the “horizontal” axes, then the issue is just a matter of view point - your camera looks at the scene in a way that “horizontal” direction is seen not horizontal.

If axes are good and the blue arrow is wrong, it might be because the arrow is not normalized (its direction length is not 1).

If none of these is the reason, then check the values. You are the only one that can see, run and debug your code.


@PavelBoytchev
Excuse me \

mappin completed \ above requird
i did draw sphere (rect) \ original rect below

Mistake division into 3 on my machine (related to call of threejs functionality, )
Developer tools \ remove cache is on

Model gltf expected to be updated when glb model updated
Sphere expectd to drawn in requird direction

And i need to compare plane and sphere instead of sphere and sphere

may be there should be helper like yii debug to show mappin between blender and threejs

it fixes the threejs project layout \ \ leastwise in the screen

wanted to construct straight line between two rect
issue is that root of mesh has position of root
and children of mesh has local position not mappd to root position
i solved it through

{
x: rootMeshFromPassd.position.x + childrenFromPassd.position.x,
z: rootMeshFromPassd.position.z + childrenFromPassd.position.z
}

and it works with rect map \

live editor i am writting
duplication from discourse.threejs.org

has straight line between \ construct\d knot through straight line \

i need to use different combine of root position and children position

where to think and to do to solve?
@PavelBoytchev @phil_crowther @prisoner849

At this point my suggestions are only three:

  • Children objects are relative to parents and calculations need to use not only positions, but also rotations; and if a parent is a child of a grandparent, then you have to also consider grandparent’s position and rotation. You may look at localToWorls, worldToLocal that convert well from one object to another
  • If you have a minimal working example in codepen.io, that demonstrates the issue, this might help a lot (but make sure it is really minimal, working and showing the issue, do not pour in the whole code)
  • As I really struggle to understand your words from pure linguistic perspective, it might be better to try to write in your native language; there are good online translators and people might finally understand what is your problem. Honestly, I am completely lost.

Edit: here is a demo of flying spaceship and from time to time an arrow helper is added to show its current position and orientation. I have absolutely no idea whether this is related to your issue.

https://codepen.io/boytchev/full/emgrqRj

image