Closed Innoviox closed 2 years ago
I'm not sure how the GetMaterial
method works. My two materials are start=0, count=30
and start=30, count=30
. The logic in GetMaterial
returns if:
if gmat.start >= vpos && gmat.start+gmat.count <= vpos
So, for material one, this will return if vpos is <= 0 but >= 30? and for the second if vpos is <= 30 but >= 60?
(for reference, this is the obj that I am trying to load: tile.zip)
I think line 210 of graphic.go should be switched to:
if gmat.start <= vpos && gmat.start+gmat.count >= vpos {
This now returns the right material. I'm going to submit a PR.
Raycasting to a Node loaded from a .obj loaded as shown in the g3nd demos leads to errors.
Load the object like this (path redacted):
The error is on raycaster.go, line 347:
Maybe because the materials aren't being loaded correctly?
Full traceback: