#How do i make a certain mechanic where enemies only move when you look away?

28 messages · Page 1 of 1 (latest)

rough zephyr
#

Probably send out a spherecast from the players head in the direction they are looking and check if it hits that object

slim hatch
#

Maybe...

#

I would have to figure out how to do that then

lunar hornet
#

Vector dot + raycast

slim hatch
#

im trying to figure that out. Do you have a chart or anything that might help?

#

dang

#

i am, its frustrating

#

cause im new to this type of thing but ik i can get it working in the future

#

just dont know how

#

if you can, that would be great

#

thanks man

slim hatch
#

im trying to get the mechanic for my personal redesign of scp-173

patent flare
#

A vector3 dot method would be the most reliable. Just only run the ai if the vector3 dot value is NOT greater or equal to 0.5 (So just use the Else output on the If to run it.)

slim hatch
#

aight, ill try it out once i get the chance.

#

you're fine man

#

ok

patent flare
#

Yea adding a raycast or spherecast could check if there are any walls/obstacles between the player and monster. If u don’t add this, the monster will stop moving when being looked at, even if behind a wall.

slim hatch
patent flare
#

It’s just an object variable and player variable. You don’t actually need those, it’s just to represent where the object and player outputs should be wired. With the object being the monster btw.

slim hatch
#

i would still like to use them just in case

#

this all seems simple, it's just that im more of a builder than a component builder so im having more trouble than most

patent flare
#

There’s no need to use them at all. They could break things in multiplayer, and use additional cpu and net.

slim hatch
#

oop

#

so should i put something else there instead of those two variables?

patent flare
#

I just gave u the base circuits. I can’t really help any further, as there are a lot of things to determine that. For example, some things would have to be changed for multiplayer, and it really just depends on the room.

slim hatch
#

ok

#

im trying to see how to implement it into this...

slim hatch
#

so, i found a more scuffed way to do it but its probably the best ill get rn. i basically just set it up on a timer for the blinking and everytime you blinks, itll move to the local player