#i dont want to spam the chat,can I dm
1 messages · Page 1 of 1 (latest)
sure,gimme sec
this is the player controller
this is the player
this is the object
it passes the sniff test -- you have a rigidbody and a trigger collider on one object, and a CharacterController on the other object
I just checked how that behaves yesterday!
so what sould i I in order to fix it?
https://hastebin.com/share/efazevetay.csharp This is my inventory manager script
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
you'll want to look at whatever is receiving the trigger enter message
I don't see any OnTriggerEnter here
https://hastebin.com/share/xukelucari.csharp This is for the objects
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Ah there it is
@hollow spade i got the ontrigger separately in the interactable object
Start adding Debug.Log to that item script
make sure it's properly detecting the player entering and exiting and that all the conditions for the Update part are true when you expect
basically - you need to start actually debugging here!
also of course check the console for errors while you do this
damn,my first time having to do this
put it inside the if statement
so we know for sure that part is actually happening
it logs that i entered and exited
i got it setup like that,so when anything with tag "player" enters it,it will be able to do the thing
NullReferenceException: Object reference not set to an instance of an object
SelectionManager.Update () (at Assets/Scripty/SelectionManager.cs:43)
https://hastebin.com/share/gofudanofo.csharp in this code
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
problem fixed,i didnt have tag main camera on my camera
ok that was hard to diagnose because the error line number didn't match your script. You must have made changes to the script
i went back to the last save of the script before i tried to fix it