Real information about Unreal Engine 3

Sunday, January 27, 2013

Mouse Picking


This information is about how to get the objects a user pick in a scene.There are two ways provided by UE3 to get the picked objects: Hit Proxy and ray tracing. Hit Proxy works like OpenGL's selection mode. It is accurate but more expensive. Ray tracing is not that accurate because the collision shapes of objects may be not identical to their graphical shapes. However, you need a source code license to use Hit Proxy, so I would like to just talk about the ray tracing method here.

To cast a ray in a scene and see what is hit, you can use the function Actor:Trace(). It returns the first hit Actor and other hit information like hit location and hit normal. Notes it only hit Actors whose bCollideActors is enabled and ignore the Actor which the invocation is on.
Read More

Followers

AD (728x90)

Powered by Blogger.