#I want this turret to only shoot at what's in front of it
1 messages · Page 1 of 1 (latest)
So first remove anything that has anything related to seeing or looking
Then in the nearest attackable target make must see to true
so, i change the code but it still shooting behind
so this is the code for now, but it does not work
I believe you need to set the animation to rotate at its target
can you explain more? For now i change the target from family=monster to tag=target and then, i set a dummy entity in front when spawn, and if entities are close to the dummy entity, tag them, but i want to know your idea
If you dont want it to rotate at all, i believe you can use minecraft:spawn_entity to shoot the projectile
Oh yeah, forgot he only wants it to shoot within the turrets pov
use script api may be
No need tbh
This would do??
ranged_fov: Field of view (in degrees) when using sensing to detect a target for attack.
x_max_rotation: Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target.
Seems if you set these to zero or nearly zero then it might only target and shoot anything in front of it and not rotate?
Still have "must see" so you don't target entities behind blocks I guess. But there's no component specifically about looking, I think all entities get a view direction based on their rotation and assumed "head".