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

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

@sunnydrake

Description

@sunnydrake

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions