Obi Official Forum
Help How can i use obi rope in unity with totally script? - 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 How can i use obi rope in unity with totally script? (/thread-2621.html)



How can i use obi rope in unity with totally script? - FZMv587 - 08-12-2020

Hi,i am new here。
I am a student,in my study i need use a rope model and neural network in the same time。
So i need use obi rope with totally script。
But, i have no idea how to start it。
Is there any example c# code files about how to create a rope,how to change the position ,how to initialize rope in the screen so i can see it ,and so on....
I really need help,thank you。

By the way,i use obi rope 5.6.2


RE: How can i use obi rope in unity with totally script? - josemendez - 08-12-2020

(08-12-2020, 08:49 AM)FZMv587 Wrote: Hi,i am new here。
I am a student,in my study i need use a rope model and neural network in the same time。
So i need use obi rope with totally script。
But, i have no idea how to start it。
Is there any example c# code files about how to create a rope,how to change the position ,how to initialize rope in the screen so i can see it ,and so on....
I really need help,thank you。

By the way,i use obi rope 5.6.2

Hi there,

I don't know what "totally script" is, a quick search in Google does not show any results. Is it any kind of visual scripting?

The manual contains several sections about scripting, with explanations and sample code to create a rope, change any particle properties (positions, velocities, masses), retrieve contact information, etc. See:
http://obi.virtualmethodstudio.com/tutorials/scriptingactors.html
http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html
http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html
http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html


RE: How can i use obi rope in unity with totally script? - FZMv587 - 08-12-2020

(08-12-2020, 10:12 AM)josemendez Wrote: Hi there,

I don't know what "totally script" is, a quick search in Google does not show any results. Is it any kind of visual scripting?

The manual contains several sections about scripting, with explanations and sample code to create a rope, change any particle properties (positions, velocities, masses), retrieve contact information, etc. See:
http://obi.virtualmethodstudio.com/tutorials/scriptingactors.html
http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html
http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html
http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html

Hi buddy

Thank for you answer me and do not think too much about "totally script", it's just script, i am not good at english, sometimes i have wrong express.

I read the pages you just gave me ,and i try to test those codes , but i meet problem in the beginning.
I update two images, one is my code and another is the error in unity.
I am just copied from " http://obi.virtualmethodstudio.com/tutorials/scriptingactors.html ".
Could you help me figure out what is the problem?
Thank you


RE: How can i use obi rope in unity with totally script? - josemendez - 08-12-2020

(08-12-2020, 10:46 AM)FZMv587 Wrote: Hi buddy

Thank for you answer me and do not think too much about "totally script", it's just script, i am not good at english, sometimes i have wrong express.

I read the pages you just gave me ,and i try to test those codes , but i meet problem in the beginning.
I update two images, one is my code and another is the error in unity.
I am just copied from " http://obi.virtualmethodstudio.com/tutorials/scriptingactors.html ".
Could you help me figure out what is the problem?
Thank you

Hi,

It's clear you're a beginner with programming. In this case, I strongly suggest to learn some basic C# before attempting to use Obi, as it is aimed at advanced users. Basic programming skills are taken for granted.

The script in your screenshot does not make any sense. The compiler is telling you it did not expect to find a function call directly inside the class, outside of a function definition. That's what the "invalid token '(' in class declaration" error means. The code must be placed inside Awake(), Update(), or any other member function you define, depending on when/how you want to execute that code.