Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

[BUG] 3rd level of nested Actor give incorrect global getPosition() #188

Open
sunnydrake opened this issue Mar 29, 2018 · 0 comments
Open

Comments

@sunnydrake
Copy link

hi im trying to draw line in three.js from one dynamically created Actor model to another
2nd level of nested Actors give correct cords and line is ok
3rd level of nested Actors give incorrect cords and line is wrong
code>>>
let toStar=(this.map[1] as Sup.Actor);
let staractor=(this.map[0] as Sup.Actor);
let toStarp=toStar.getChildren()[0].getPosition();
let staractorp=staractor.getChildren()[0].getPosition();
let g=new THREE.Geometry();
g.vertices.push(new THREE.Vector3(staractorp.x,staractorp.y,staractorp.z));
g.vertices.push(new THREE.Vector3(toStarp.x,toStarp.y,toStarp.z));
let line=new THREE.Line(g,new THREE.LineBasicMaterial({color:0xFFFFFF,opacity:0.5} ));
screenshot from 2018-03-29 16-49-53
screenshot from 2018-03-29 16-51-19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant