I want to program a weeping Angel Mechanic,

Hello, i want to program a weeping Angel Mechanic, where a Model moves only when it is in your view, i already programmed the walking and a hitbox that is infront of your camera, but i have problems with the collision.

I thought that i would just add the yellow collide function and set a value (Is_in_Hitbox) to true when the hitbox collides with the model, and then when it doesn’t i just set the value to false. But this doesn’t work, any ideas?

Typescript code collide:

1. * > enemy.onCollisionEnter( collidingItem=> {
2. * >     if (collidingItem.name == "bullet") {
3. * >         enemy.delete()// do something
4. * >     }
5. * > })

Codeblocks code collide:

If your model has a shadow, I think your model will be larger, because the models in cospace will be contained in a box, so when the shadow model is large and long, it will lead to collision areas will be larger than expected

Hope it help u!