Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: mpaul0055 on September 27, 2013, 07:01:26 AM

Title: Raycasting with Playmaker
Post by: mpaul0055 on September 27, 2013, 07:01:26 AM
Hi Guys

I really hope someone can point me in the right direction as im struggling with the Raycasting in Playmaker.

I need to use a raycast for opening doors and picking up objects, but all the tutorials i can find are specifically about enemies and ai. I have tried to adapt these and learn from them, but im just not getting how to set it all up.

Do i need to make a Raycast FSM on every object that you will be able to interact with, or can i have the main  Raycast FSM on the character?

Can someone give me a few pointers on where to start?

Any help would be massively appreciated.

Thanks

Mark
Title: Re: Raycasting with Playmaker
Post by: redikann on September 27, 2013, 03:53:58 PM
A raycast should be very flexible for you to use how you need it. Your probably just doing something simple wrong. If your firing a ray from your player then you need to make sure it is at least firing in the direction that would likely be obvious to the player. Also you need to know how to filter the information the ray can collect so you can do something purposeful if you do hit an object. Tags and layers are one way to sort objects. you do need to use colliders on objects to interact with them.
Title: Re: Raycasting with Playmaker
Post by: mpaul0055 on September 28, 2013, 06:55:39 AM
Thank Redikan

Could you give me a little outline on the best way to setup a raycast for say opening a door?

Ive got opening and closing doors using the mouse pick function, but when i try and use the raycast, im not getting the desired results.
Title: Re: Raycasting with Playmaker
Post by: arwengrim on September 28, 2013, 06:00:39 PM
Make sure to tick "debug". For me thats a great help to see where the ray actually points. Every so often, thanks to myself, it points in completely different directions than I expected.
Title: Re: Raycasting with Playmaker
Post by: mpaul0055 on October 02, 2013, 10:18:25 AM
Make sure to tick "debug". For me thats a great help to see where the ray actually points. Every so often, thanks to myself, it points in completely different directions than I expected.

Thanks Man, Will keep that in mind :)
Title: Re: Raycasting with Playmaker
Post by: mpaul0055 on October 08, 2013, 07:15:02 AM
Does anybody know of any Raycasting Tutorials i can get lost in? Im struggling to find much on it for Playmaker.

Thanks