Scene Picking implementation #2863
Eideren
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checking to see if your cursor is above a given mesh is not that straightforward to setup, you'll find three file in the archive below,
Picking.cs
with the standard c# classes required to set it up,PickingForwardShadingEffect.sdfx
and its*.cs
file for the shader part of the logic.You'll need to drop
PickingForwardShadingEffect.sdfx
and its*.cs
in your game's effects directory, create one if it is not already done and add it to your project's*.sdpkg
Usage:
The majority of the implementation is lifted off of Stride's own scene picking system, fixed a couple of issues specific to how games are setup compared to the editor.
This implementation could be fairly easily adapted to handle other locations than just under the mouse cursor if needed
Picking.zip
Beta Was this translation helpful? Give feedback.
All reactions