01-05-2020, 02:41 PM
(This post was last modified: 01-05-2020, 02:42 PM by josemendez.)
(01-05-2020, 02:31 PM)fishing-rod Wrote: Hi,
I want the player to be able to pick up a rod. I'm checking for pickable objects via spherecasting in front of the player. Unity collider, which are needed for raycasting, are not moving though when attached to a rod. How else could I detect a rod via casting?
greetings
Obi is not made using Unity's physics engine, so particles aren't part of Unity's physics engine (if they were, we would inherit all performance and stability problems of the built-in engine). Using raycasting/spherecasting won't detect them, as casting only works with the built-in Unity physics objects.
Particles use their own collision detection system, here's how you can get all to contacts in a frame and detect Unity objects colliding against particles (trigger colliders work too):
http://obi.virtualmethodstudio.com/tutor...sions.html