Skip to content

How to give a circular FOV effect around the character with raycaster? #32

@scm1400

Description

@scm1400

I want to make circular FOV in the form of the following picture.
image

image

I have tried many things such as reducing the length of the rayRange while looking at all your ray cast related codepen, but it is not easy for me to make the code into the form I want.

Can I ask for help if possible?

https://codepen.io/scm1400/pen/qBoGxQX

ray = raycaster.createRay({
            origin: {
              x: 400,
              y: 300
            },
            detectionRange: 150,
            ignoreNotIntersectedRays: false,
            rayRange:150,
            // round: true,
            // autoSlice: true,  //automatically slice casting result into triangles
            collisionRange: 150, //ray's field of view range
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions