Obi Official Forum
Help question about actor - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help question about actor (/thread-2656.html)



question about actor - FZMv587 - 21-12-2020

Hi bro,

I need use actor to get particles position.

I declare actor in Class and use it in Update() function,like picture.

And i get errors,but only at the first in Update() loop,then it can run well without errors。

I wonder what is the reason and how can i fix it .


RE: question about actor - josemendez - 21-12-2020

(21-12-2020, 02:50 PM)FZMv587 Wrote: Hi bro,

I need use actor to get particles position.

I declare actor in Class and use it in Update() function,like picture.

And i get errors,but only at the first in Update() loop,then it can run well without errors。

I wonder what is the reason and how can i fix it .

Hi there!

you're missing:

Code:
if (actor.isLoaded)

before the for loop. You can't access actor data unless it's loaded in the solver Sonrisa. See: http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html
let me know how it goes!