Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending the Ray class functionality #320

Merged
merged 3 commits into from
Nov 26, 2014
Merged

Extending the Ray class functionality #320

merged 3 commits into from
Nov 26, 2014

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Nov 26, 2014

A new static CreateNewFromTo to allow creating ray with two points in
space. The function accepts a matrix to transform the ray. default is
the identity matrix.
The function calculates the direction of the vector and its length (for
trianglular intersections)
Also added length parameter to the ray (default is Number.MAX_VALUE) to
prevent wrong intersection detection of objects that stand behind the
end point. Default behavior is not affected by it. Triangle-Intersection
now checks if the distance is correct and returns null if the ray
doesn't actually touch the object inspected.
This is the first change after this long discussion - http://www.html5gamedevs.com/topic/10602-camera-follows-a-character-ever-cut-by-a-wall/

A new static CreateNewFromTo to allow creating ray with two points in
space. The function accepts a matrix to transform the ray. default is
the identity matrix.
The function calculates the direction of the vector and its length (for
trianglular intersections)
Also added length parameter to the ray (default is Number.MAX_VALUE) to
prevent wrong intersection detection of objects that stand behind the
end point. Default behavior is not affected by it. Triangle-Intersection
now checks if the distance is correct and returns null if the ray
doesn't actually touch the object inspected.
@deltakosh
Copy link
Contributor

Excellent job!

deltakosh added a commit that referenced this pull request Nov 26, 2014
Extending the Ray class functionality
@deltakosh deltakosh merged commit 10e9dfc into BabylonJS:master Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants