Bug when using lookat function

(Edsahergom) #1

Hello Guys,

There is a bug I found when using the function lookat of SketchfabAPIUtIlity. Sometime the model gets crazy when I go from one look at to another, specially from lookat right directly to lookat left. The model starts to rotate without control infinite times so at the end the model start to look like a blur. This has happened in any model I use so it seems to be related to the API. Any ideas how to fix this?

Thanks for your help.

(Shaderbytes) #2

hey there , I juds checked on the demo page quickly, seems "worldMatrix" property is undefined?

@stephomi or @tribble42

(Edsahergom) #3

Hello Shderbytes, which one is the demo page?

(Stephomi) #4

@tribble42 = backend developer (handles backend api)
@stephomi = frontend developer (I don't really handle the frontend api but I happened to be one of the most active developer on the forum)

@shaderbytes Where is the demo page?

(Shaderbytes) #5

ok sorry i only know rwo dev names :slight_smile:the page is here : http://www.shaderbytes.co.za/sketchfab/development/api/examples/example_5.html

I saw an error and consile.logged sketchfabAPIUtililty.nodesRaw

which is a stright dump of yor flattened nodes arrays, my array is a reference to these objects . I looked it complained about an index of undefined.. the propetry, name "world Matrix" is either supposed to be set by you guys.. or it is by me .... sorry I didnt give it much time/.... quick debug

(Edsahergom) #6

Hi Guys,

I am not sure if that was what you were telling me but what I found is that the object axis needs to be in the origin in order to avoid that bug.

Thanks for your help.

(Stephomi) #7

@shaderbytes looks like worldMatrix is only defined if the node type is 'MatrixTransform'.
Not sure that's what we want but it looks like it has always been the case.

(Shaderbytes) #10

i will investigate since i know i changed some of the storage of nodes ..recently

this all worked fine until the tool had to be used on skinned meshes, in this matrix tanform nodes are empty an groups are used more.. just need to think of better storage.. in my demo the model has Matrix transfroms and groups with the same name..sigh

(Shaderbytes) #11

all fixed uo , changed storage, I mean i could do it the normal full look up way .. but I got si to work..slight chages to my API . this should not affect any static models, For sinned models you will have to specify you want to look in groups type.