I'm doing some research on the problem 4 now.
Best regards and by the way I really love your engine, it helped me so much this far.
Best regards and by the way I really love your engine, it helped me so much this far.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: "eye1"Hello
I'm using this code to retrieve current position of Object in worldprivate SimpleVector getParentTrans(Object3D model)
{
Object3D[] parents = model.getParents();
SimpleVector sv=new SimpleVector();
for (int i = 0; i < parents.length; i++) {
if (parents[i] != null) {
sv.add(parents[i].getTranslation());
sv.add(getParentTrans(parents[i]));
}
}
return sv;
}
public SimpleVector getCurrPosition()
{
SimpleVector sv = model.getOrigin();
sv.add(model.getTranslation());
SimpleVector par = getParentTrans(model);
System.out.println("PAR: "+par);
sv.add(par);
return sv;
}
it looks like it works fine!!!
But when I unlink child from parent it look like it is not removed from array which is returned by method Object3D.getParents(). Is that a bug, or i made a mistake??
Regards
private SimpleVector getParentTrans(Object3D model)
{
Object3D[] parents = model.getParents();
SimpleVector sv=new SimpleVector();
for (int i = 0; i < parents.length; i++) {
if (parents[i] != null) {
sv.add(parents[i].getTranslation());
sv.add(getParentTrans(parents[i]));
}
}
return sv;
}
public SimpleVector getCurrPosition()
{
SimpleVector sv = model.getOrigin();
sv.add(model.getTranslation());
SimpleVector par = getParentTrans(model);
System.out.println("PAR: "+par);
sv.add(par);
return sv;
}
Page created in 0.375 seconds with 12 queries.