playMaker

Author Topic: Problem with raycast normal  (Read 3148 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6499
    • jinxtergames
Re: Problem with raycast normal
« Reply #15 on: September 26, 2018, 12:45:10 PM »
Hi.
It's not one of my best video's but it explains how to do :)

« Last Edit: September 29, 2018, 12:46:58 AM by djaydino »
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Franck

  • Junior Playmaker
  • **
  • Posts: 89
Re: Problem with raycast normal
« Reply #16 on: September 27, 2018, 04:52:37 AM »
wow thanks djaydino it works.

You win a subscriber to your youtube channel!

I use with that the "create object" action because with pooler it is so complicated for my shotgun. Indeed I have 12 raycasts in my FSM to spawn 12 bullet holes and with Pooler I will have too many states...lol

However, Is there a way to decal the object (bullet hole) a bit because it clip when it spawn on the objects?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6499
    • jinxtergames
Re: Problem with raycast normal
« Reply #17 on: September 27, 2018, 05:59:59 AM »
Hi.
Aw i forget to show the bullet hole prefab on the video....

I have an empty object and in there i have a plane (child) with the bullet hole and i have the (i believe) z position set to 0.0001 and x rotation to 90
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Franck

  • Junior Playmaker
  • **
  • Posts: 89
Re: Problem with raycast normal
« Reply #18 on: September 27, 2018, 06:32:45 AM »
Oh yep, got it !
Thanks a lot djaydino :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6499
    • jinxtergames
Re: Problem with raycast normal
« Reply #19 on: September 27, 2018, 10:36:25 AM »
Hi.
You can also use an offset if needed, just add these 2 actions on the top of the 'Spawn Bullet Hole' state :

Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6499
    • jinxtergames
Re: Problem with raycast normal
« Reply #20 on: September 29, 2018, 12:47:46 AM »
Hi.
Uploaded video link with a new one (including offset info)

Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Franck

  • Junior Playmaker
  • **
  • Posts: 89
Re: Problem with raycast normal
« Reply #21 on: September 29, 2018, 10:41:27 AM »
Yep I saw, I subscribed to your channel :)

The TCDC Studios

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Problem with raycast normal
« Reply #22 on: July 23, 2021, 04:28:23 AM »
Hi.
After you pool the object you should store the object and then use the "Quaternion Look Rotation" with the stored object.

I looked to a c# tutorial doing this :



So he is doing a raycast,
Then instantiate (where he should pool)

Then uses the hit point + hit normal multiplied by 0.00001 (this is to set it a little bit in front of the hit position, so you wont get flickering images)
and Quaternion.LookRotation with the hit normal.

I  will see if i can make a sample after the weekend.

can you tell in detail which pooler should we use. is it pooler spawn.  dont understand i am new.

The TCDC Studios

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Problem with raycast normal
« Reply #23 on: July 23, 2021, 04:35:46 AM »
where is video i cant find it bro.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6499
    • jinxtergames
Re: Problem with raycast normal
« Reply #24 on: July 23, 2021, 09:29:32 AM »
Hi.
You can use any pool system that has playmaker support.

The Pooler Pool is on the Ecosystem
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!