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

castRay() from inside geometry has different behaviors #166

Open
lukaspj opened this issue May 30, 2020 · 1 comment
Open

castRay() from inside geometry has different behaviors #166

lukaspj opened this issue May 30, 2020 · 1 comment

Comments

@lukaspj
Copy link
Contributor

lukaspj commented May 30, 2020

This issue was created in the GarageGames Repository (Link to original issue).
The issue was originally created by @lornemcintosh and had a total of 2 comments that may contain additional information. The original issue description is pasted below:

I've been relying (for better or worse) on the fact that SceneContainer::castRay() used to return true, and set rayInfo.t = 0 (as if it hit something immediately) when ray-casting from inside a .dif interior to some point outside.

In T3D 3.0 interiors are history, and I've noticed that castRay() has totally different behavior for TSStatics. It returns differently based on the TSStatic collisionType:

  • Bounds = returns true, rayInfo.t = 0 (same old .dif behavior)
  • Collision Mesh = returns false, regardless of type (Box, Capsule, Convex, Mesh etc.)
  • None = returns false (obviously)
  • Visible Mesh = returns false

Terrain has yet a third behavior. castRay() returns true and sets rayInfo.t as if the ray collided with the backside of the terrain on its way out (ex. 0.6189).

So... which should it be? Can we get consistent behavior across all types? What's the correct way to test a point for inside / outside collision geometry?

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

No branches or pull requests

2 participants
@lukaspj and others