27-02-2023, 11:27 PM
(27-02-2023, 09:29 AM)josemendez Wrote: Yes, you need to call GenerateSmoothChunks() passing an an array of positions instead of an ObiRopeBase instance as indicated in my previous post. If you want to trigger a renderer update too, you should also call the OnCurveGenerated() event.
See how both are usually called in the Actor_OnInterpolate() callback, as a response to the actor -rope in this case- finishing interpolating physics state.
Both look fine at first glance.
Let me know if you need further help,
cheers!
I still cant get it to work! Im now calling the GenerateSmoothChunks() and OnCurveGenerated() functions but still no rope showing up. My guess is that I must modify the OnCurveGenerated() function? Because it requires a actor (Im just passing the actor as null), in the OnCurveGenerated() function it checks if a mesh is null and it obiously is and just returns instantly before doing anything.
This is what my functions looks like now
(https://pastebin.com/0gTNmifd, message was too long so could not paste it here)
Im calling GenerateSmoothChunks() from another script in the Update() loop using transform.GetComponent<Obi.ObiPathSmoother>().GenerateSmoothChunks(allRopeRigids.ToArray(), 0);
Here are the components I have attatched to the gameobject
(Could not attatch or paste ) https://imgur.com/a/5EXTB0C