Support Forum

Console Alert when Drawing Wire Capsule Gizmo

I’m having this problem where I’m getting a console alert every second during Editor & Play mode. I’ve attached a screenshot of the console as well as my code. Also, to note I’m using Oculus SDK, not sure if that has anything to do with it.


I’m not too sure what’s changed, but its all working properly now

Hi

Ah. Those particular arguments do cause an issue in the code. I have fixed those locally so they the fix will be included in the next update.

Those parameters don’t do what you want though.
The parameters for that method are

float3 bottom, float3 top, float radius

So the 0f will be converted to (0,0,0) and the capsuleColliderHeight will be implicitly converted to (capsuleColliderHeight, capsuleColliderHeight, capsuleColliderHeight) which is a direction I don’t think you want.

Instead I would recommend

Draw.WireCapsule(float3.zero, new float3(0, capsuleColliderHeight, 0), capsuleColliderRadius);

Due to the bug for those particular parameters (in particular when the second parameter is a multiple of (1,1,1) the capsule will be upright for those parameters, but really it should look like this (which it does after the fix):

image

ahh ok. That makes sense, thanks for clearing that up.

1 Like