|Topic was automatically imported from the old Question2Answer platform.
I’m using the raycast function to check for collisions.
But i want it to only check the point and not the ray. Because it needs to be able to hop over blocks.
I hope the question is clear.
It’s not clear to me what you’re trying to accomplish. I don’t see how “checking a point” will allow you to hop over blocks. By “point” I assume you mean the end of the ray, but based on your character’s position relative to a box, that still seems problematic.
You probably need to provide some additional information to get any useful assistance. Is this 2D or 3D? Maybe a picture and/or better description of the problem you’re trying to solve.
A few ideas based on limited information:
- You can make the ray very short, and move it to what would be the “end” of a normal ray (though, again, I’m not sure what that solves)
- You can define the array to ignore certain objects, layers, or types. Perhaps this could be used to ignore the boxes (if that’s the issue here)
- You can simply ignore a given reported collision(or class of collisions) if you’re not interested in it.
If the above isn’t helpful, please provide additional details.
jgodfrey | 2020-09-11 17:10
Using a array to ignore certain objects would not work.
Im trying to get this move done:
The red line is the line it flips over (this time the vertical one)
the yellow lines are the raycasts.
The thing is the end position is not blocked, while the path is blocked (bottom yellow line intercecting with the block)
Currently the move is not allowed because of the collision ray, but the goal is to be able to make this move.
PepijnWe | 2020-09-11 17:33