RayCast (Script Canvas)

Hello!

I used the Flow Graph before. Here is one of my scripts using RayCast.

This is how it works

And now I want to do the same thing in Script Canvas. But I can not understand how to use these RayCast nodes.

How can i use this node?

Thanks in advance!

I also want to know this

Hi @cfree,

yes
, I implemented FIRST PERSON character controller without code, using only Script Canvas, a few hours next , I publish good tutorials about
make a FPS , throw Grenade, Raycast and much more…

Stay tuned :wink:

We need a sample on how to use Raycast with Script Canvas!

https://github.com/Ahmad0Karami/FPS-Shooter-Sample-Project-Script-Canvas-Node-Base-Language-Amazon-Lumberyard-1.14

I"m not doing FPS, but I imagine it would work equally well for a 3rd person controller for adventure game, eager to see it, as the playerslice does not work out of box for non spastic rotation of camera, at least I can’ get it working and I"ve tried , a lot.

I suspect its that I’m missing camera rig gem, bc to get it we must bring in a ton of 3rd party tools and compile it all ( unless I’m wrong about that process, I"ve never done it, not having enough ssd space, yet )

Is there an equivalent for MouseRayCast in the current [1.19.0.0] version of ScriptCanvas?

I’ve had several issues trying to implement a 3rd-person camera and convert the position of the cursor to a real-world position via raycast. I also couldn’t see an easy way to get the current screen width/height and ended up having an invisible pixel in a UI to use as a reference point.

An example of getting a world position from a cursor raycast would be very useful as the example linked by AhmadKarami is character-based rather than cursor based.

1 Like

I would love to know if MouseRayCast has been implemented in ScriptCanvas yet?

@stom @cfree @m0pt0pmatt

I created a new post for the topic, I included an example of mouse raycasting / mousepicking in script canvas.