简体   繁体   中英

Draw a-cylinder between 2 dots with A-frame

i just newbie in a-frame, and i cant find information about it.

I have 2 dots, start and end, ex: {x: 0, y: 0, z: 0} and { x: 10, y: 0, z: 0 } How can i place a cylinder between them, or i must do transform with translate and rotate manually?

When arranging your scene way, it's helpful to use the A-Frame inspector to visually drag things around and resize them. This inspector is be opened with ctrl + alt + i .

In this particular case, the tube component might actually be closer to what you want. It draws a cylinder along an arbitrary list of points you provide:

<a-tube path="5 0 5, 5 0 -5, -5 0 -5" radius="0.5" material="color: red"></a-tube>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM