unity steamvr interactable problem with IK body how can i solve it? - unity3d

when i use interactable and throwable steamvr scripts on this body, the leg every time i grab it this glitsh is happen, i don`t know what problem is in scripts or IK body or what
none,i didn`t try any thing

Related

Unity C# collision detection

I made/trying to make a melee two-dimensional game in Unity. The enemy can attack the player no problem, but the other way around is very finicky and unreliable. The enemy has both a ridged body and a box collider, and the same with the player.
This code is all on the enemy
code: https://pastebin.pl/view/a6d99e0d
Because I do not know the specific project, I can not give a specific answer.
But I can provide a similar dilemma I have encountered before. My input was not responded in time in the game. When the player pressed after the jump key, the protagonist may not have been be able to jump in time. When I changed the FixedUpdate in the code to Update, the problem was solved.
Of course, my approach is flawed, but I hope my problem can be addressed to the subject. Bring some tips and good luck!
You're validating input, and updating physics both in the void OnTriggerEnter method. Physics updates much differently than the regular old Update() method does.
Your physics checks are already completed (I guess in this case it could be either or).
By calling Input.GetButtonDown() in this method, it has to grab the exact frame that button mashed down to return true.
The problem is, physics don't Update in the same way. Actually, you aren't even running a physics check this frame. That button just got completely ignored. Dang.
You have to come up with a better way to structure your code to process that input. Find a way that allows you check if the player is attacking, without relying on input. You could always try a state pattern.
See also MonoBehaviour.FixedUpdate().

My character suddenly stopping in my unity project

I have tried every solution but I couldnt solve this problem, when my character turning left or right it stucks pls help me
Make sure that there is no invisible Collider and also make sure that your Players collider are not overlapping
If your script is the problem then i suggest to download the standard assets pack from the asset store and use the default movement script.

I can't get my sprites to trigger a collider at all in Unity

I am trying to get one sprite(the player) to trigger a function when colliding with another object that is getting cloned and put into random places within the play field. I have my player collider set to being a regular collider with a rigidbody2D attached. The object to collect here is marked as a trigger, is kinematic, has the OnTriggerEnter function attached(which most other scripts have at this point just to see if it would work), and not a single thing has changed anything about how the game runs or works or anything it seems. What am I missing?
After reading a comment on the main post, I found the answer. I simply didn't know that Collider2D and OnTriggerEnter2D was a thing, and once fixing that, I was able to solve the issue!

Unity: SteamVR TeleportArc not colliding correct in Build

i am using Unity 2019.4.9f1 with SteamVR. The Teleporting-System works as expected in Playmode. When I build, there are some strange collision-glitches with the TeleportArc. The point at the end does not collide correct with mesh. The colliders seem to be underneath the floor(while still working properly), or the wall mesh etc. I am also able to see the TeleportPoint through mesh.
Editor-Playmode:
Working as expected
Build:
TeleportArc not colliding with Wall
TeleportArc not colliding with Floor
TeleportPoint visible through Wall
Has anyone experienced errors like these? Thanks in advance.
Edit: I would like to show these images in my posting but I am not allowed to because of my karma.
Okay, I found a solution:
It is a problem with the Material of the Teleporting Prefab. The URP-MaterialSwitcher was not working correct. I changed the materials manually and now everything is working fine.
https://github.com/ValveSoftware/steamvr_unity_plugin/issues/875

Script is suddenly unable to find a GameObject in the scene

Last night I was working on my game, and everything seemed to be working perfectly. I added a sprite to my Assets/Sprites folder, then my laptop died. When I plugged it in and turned it back on, the GameObject.Find("Weapon Wheel") line in my PlayerControls script was no longer able to find the weapon wheel object. To my knowledge, no changes to the scene or any scripts were made.
Even stranger, my CommandPattern script also has GameObject.Find("Weapon Wheel"), and is able to find it perfectly fine.
Has anyone experienced the Find function suddenly not working, and if so, found a solution for it?
EDIT: Deleting the player prefab then replacing it with a new one fixed the issue, but I still have no idea why this happened in the first place.
I dunno how ur game is architectured and a direct solution but you can try to create a Gameobject variable in the Playercontrol class and then drag the weapon wheel in the field in the unity overlay