#player trigger collision

1 messages · Page 1 of 1 (latest)

sullen lantern
#

we have a thread now

#

player trigger collision

queen escarp
#

k

#

can u help me

sullen lantern
#

could you send screenshots of your player and the trigger in the inspector (all of their components)

queen escarp
#

k

sullen lantern
#

could you send the trigger object as well?

queen escarp
#

k

#

oh no wrong onw

#

e

sullen lantern
#

okay the issue is just that your collider isn't a trigger

#

so ontriggerenter is never called - either change it to oncollisionenter or switch the collider to a trigger

queen escarp
#

ok

#

thanks

#

ill do it now

sullen lantern
#

np!

queen escarp
#

its not working

sullen lantern
#

did you change the script or the collider?

queen escarp
#

script

sullen lantern
#

so it's now in void OnCollisionEnter(collider other)?

queen escarp
#

what does this mean

sullen lantern
#

ah my mistake

#

it needs to be OnCollisionEnter(Collision other) - collider only works for trigger enter

#

OnCollisionEnter is a Unity Event function, which means that it is called by unity and expects the syntax to be a certain wau

queen escarp
#

tysm

#

it works

#

your a life saviour

sullen lantern
#

glad I could help :)

queen escarp
#

your so helpful

#

been spending like 12 days tryna do this

sullen lantern
#

haha that's how it goes