Obi Official Forum
Help Player standing on Rope but not grounded - 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 Player standing on Rope but not grounded (/thread-4012.html)



Player standing on Rope but not grounded - fevzi - 26-09-2023

Im trying to make the Player grounded when staying on an rope like this

https://ibb.co/xg5RKTX
Im using Physics.CheckSphere(groundCheck.position, 0.1f, ground); to look for collisions with layer ground under the player but it doesnt seem to work for the rope
Any ideas how to fix ?


RE: Player standing on Rope but not grounded - josemendez - 26-09-2023

(26-09-2023, 12:42 PM)fevzi Wrote: Im using Physics.CheckSphere(groundCheck.position, 0.1f, ground); to look for collisions with layer ground under the player but it doesnt seem to work for the rope
Any ideas how to fix ?


Hi,

The Physics namespace in Unity only works with Unity's built-in physics, that is to say, rigidbodies and colliders.

Obi is an entirely separate, particle-based physics engine. It has its own spatial queries, collision callbacks, etc. See the manual for details:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingcollisions.html
http://obi.virtualmethodstudio.com/manual/6.3/scriptingqueries.html
http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

In your case, you want to use a spatial query to check for distance between simplices and the character position.

kind regards,