Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to give a tension to rope...
#4
(21-10-2021, 02:36 AM)sangku2000 Wrote: It not changing a component but a code?

Yes, you need to write some code for this to work.

(21-10-2021, 02:36 AM)sangku2000 Wrote: And than, what script?

Your own script, you need to write a script that calls cursor.ChangeLength(yourNewLength), where "cursor" is a variable of type ObiCursor.

(21-10-2021, 02:36 AM)sangku2000 Wrote: I've searched all scripts using a keyword "cursor.ChangeLength" but, i only found ObiRopeCursor.cs ....is it correct to change this cs file??

Im a bit confused by this question...you don't have to change ObiRopeCursor.cs or any other Obi script, if you do you can break the asset.

ChangeLength() is a public method exposed by ObiRopeCursor. You simply add a ObiRopeCursor component to your rope, and then call its ChangeLength() method in your own script. Take a look at the manual for an in-depth explanation and some sample code:
http://obi.virtualmethodstudio.com/manua...ursor.html

Note C# scripting skills are an absolute requirement to be able to use Obi, if you're unfamiliar with scripting/programming you'll find it very hard to use. See our FAQ:
http://obi.virtualmethodstudio.com/faq.html

Quote:Is scripting / coding required to use Obi?

For anything except the bare basics, yes. Obi is written in HPCS (high performance C#) and C++11, and it exposes a C# API. Obi deals with hundreds of particles and thousands of constraints every frame. These are exposed to you, the user, so learning how to write performant code is a prerequisite.
Reply


Messages In This Thread
How to give a tension to rope... - by sangku2000 - 20-10-2021, 03:27 AM
RE: How to give a tension to rope... - by josemendez - 21-10-2021, 08:18 AM