Hi everyone,
first post so hope you're all well.
I'm making a tank sort of bot to attack an avatar. So far it is going relatively well except for one thing.
I'm trying to make it detect whether an avatar is behind a wall and if so then to ignore it. To do this i have worked out the distance from the wall to the bot and from the avatar to the bot and then working out which is closer.
For the wall i have made it so that it changes the z axis distance so that it is the same as the bot so that it doesn't use the centre of the wall if you get what i mean? BUT, i keep getting strange readings for the distance from the bot to the wall. By this I mean MASSIVE readings (like so far up to 2300 ish. I've set the arc at PI/4 ( so that it detects infront of it) in llSensorRepeat and noticed that it seems to get these strange readings when the bot is looking toward the edges of the walls.
As you can probably tell, this isn't really helping because if the avatar is behind a wall and the wall reading is massive, the bot is still going to try to shoot it.
Does anyone have any ideas on this or thoughts or anything? I'm starting to get a bit frustrated with this.
Also note that I have only really just begun to get into all of this second life scripting stuff so I'm still relatively new to it all.
Thanks in advance