Guest User

Untitled

a guest
Apr 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. whatever I have tried the sprite is not oriented properly with the cylinder.
  2.  
  3. ### what I have now.
  4.  
  5. [enter image description here][1]
  6. [enter image description here][2]
  7. [enter image description here][3]
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. console.log('scene', this.scene);
  15.  
  16. const copy_cylinder = cylinder.clone();
  17. console.log('copy', copy_cylinder);
  18.  
  19. const pos = copy_cylinder .position;
  20. console.log('pos 0', pos);
  21.  
  22. pos.transformDirection( copy_cylinder .matrixWorld );
  23. console.log('pos 2', pos);
  24.  
  25. pos.multiplyScalar( 3 );
  26. console.log('pos 3', pos);
  27.  
  28. sprite.position.set(pos.x, pos.y, pos.z);
  29. cylinder.add(sprite);
  30.  
  31. [1]: https://i.stack.imgur.com/SAp2u.png
  32. [2]: https://i.stack.imgur.com/2Y19F.png
  33. [3]: https://i.stack.imgur.com/YiDeW.png
Add Comment
Please, Sign In to add comment