Hello there iโm currently working on a project where i want to detect collision with 2 box colliders and perform an action on the if statement.
Can someone help me?
by user 388785392188653589
Hello there iโm currently working on a project where i want to detect collision with 2 box colliders and perform an action on the if statement.
Can someone help me?
by user 388785392188653589
Whats the code showing? You can just implement onCollisionEnter
on a component that is on the box collider.
by user 388785392188653589
There are some samples in here using that (for e.g. changing the color on collision: GitHub - needle-tools/needle-engine-samples: Live: https://engine.needle.tools/samples ๐ต Needle Engine sample scenes - use as examples and as a reference for learning ๐)
Thatโs a callback function and invoked by the physics engine
you dont invoke it with a box collider component
hereโs a sample in action https://engine.needle.tools/samples/basic-physics/
Thx!
by user 388785392188653589