Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138134

a-frame entity-positioning and rotation

$
0
0

Sadly I am not familiar with the positioning and rotation of entites in 3D space, so I want to create a function that positions an entity with easier to understand parameters like:

createEntity(vertical, horizontal, distance)

for

<a-entity position="-2 0 -2" rotation="-10 30 0"></a-entity>

where vertical and horizontal are float-values between 0 and 360 and distance is a float where 0 is position "0 0 0" and as higher the value than farther the entity goes.

the rotation should face the camera at init.

are there helper-function for the calculations?


Viewing all articles
Browse latest Browse all 138134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>