DaveTran 3 Junior Poster

I have a method the finds the nearest cell in a grid using ray traversal. The method may or may not find a cell.

I would like to return the cell location value from the method if it is found but null if it isn't.

The value is non nullable but I would also like to avoid nullable 'Vector3?' types if possible.

My thought was to use the following:

private bool FindNearestCell(out Vector3 cellLocation)

but that doesn't seem right.

Any ideas?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.