playMaker

Author Topic: Raycasting with Playmaker  (Read 2523 times)

mpaul0055

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Raycasting with Playmaker
« on: September 27, 2013, 04: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
« Last Edit: September 27, 2013, 06:56:25 AM by mpaul0055 »

redikann

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: Raycasting with Playmaker
« Reply #1 on: September 27, 2013, 12: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.

mpaul0055

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Re: Raycasting with Playmaker
« Reply #2 on: September 28, 2013, 03: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.

arwengrim

  • Playmaker Newbie
  • *
  • Posts: 7
  • Learning making games
    • View Profile
    • LittleMonstr
Re: Raycasting with Playmaker
« Reply #3 on: September 28, 2013, 03: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.
I'm learning to make games. Please bare with me :)

mpaul0055

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Re: Raycasting with Playmaker
« Reply #4 on: October 02, 2013, 07: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 :)

mpaul0055

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Re: Raycasting with Playmaker
« Reply #5 on: October 08, 2013, 04: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