playMaker

Author Topic: are Raycasts in fixed update by default?  (Read 5410 times)

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
are Raycasts in fixed update by default?
« on: March 18, 2017, 04:11:44 PM »
my game uses a lot of physical interaction and i'm trying to cast a ray onto a moving surface. it seems to be lagging behind its cast position. does anyone know if raycast is in fixed update by default? i've tried several interpolation settings on both the casting object and its surfaces and the result is almost always the same.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #1 on: March 20, 2017, 05:05:55 AM »
Hi,

Raycast works on Update. I can make an new version whee you select when to do this ( late or fixed update).


 Bye,

 Jean

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: are Raycasts in fixed update by default?
« Reply #2 on: March 20, 2017, 02:21:14 PM »
if you could that would be fantastic. i have a convoluted raycast setup that works fine on non moving objects but messes up between anything moving faster than a set speed. i should get around to redoing the whole system but if there was a fixed update raycast i think it would work fine.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #3 on: March 21, 2017, 02:57:08 AM »
Hi,

 ok, it's on the ecosystem, let me know.



 In order for fixed update to work, ALL actions within your state have to work on fixed update, so watch out for this.

 Bye,

 Jean

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: are Raycasts in fixed update by default?
« Reply #4 on: March 21, 2017, 04:48:03 PM »
hi jean, sorry for the double post. it wont happen again.

i can't seem to get to get it to import. i get this error message

Assets/PlayMaker Custom Actions/__Internal/FsmStateActionAdvanced.cs(1,0): error CS1525: Unexpected symbol `404'

i have to delete this FSM script and the advancedraycast script to have the project run. its probably something i'm not doing correctly.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #5 on: March 22, 2017, 01:35:11 AM »
Hi,

 Ah no, it can be two things, either the download failed for that file, or there is this glitch with the folder "_Internal" sometimes, I messed up and sometimes it's with a small "i" "_internal"

try to get the action again, and check the PlayMaker custom action folder, and rename the "_internal" to "_Internal".

Let me know if you still struggle with this.


Bye,

 Jean

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: are Raycasts in fixed update by default?
« Reply #6 on: March 22, 2017, 05:49:36 PM »
ok ill check it out today, thanks a lot for this.

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: are Raycasts in fixed update by default?
« Reply #7 on: March 23, 2017, 05:13:34 PM »
Hi,

 Ah no, it can be two things, either the download failed for that file, or there is this glitch with the folder "_Internal" sometimes, I messed up and sometimes it's with a small "i" "_internal"

try to get the action again, and check the PlayMaker custom action folder, and rename the "_internal" to "_Internal".

Let me know if you still struggle with this.


Bye,

 Jean

now im getting,

Assets/PlayMaker Custom Actions/__Internal/FsmStateActionAdvanced.cs(1,0): error CS1525: Unexpected symbol `404'

and some other errors

i do have something like 200 errors usually though, honestly my game is a mess. i don't think its something you're doing wrong. i'll just try to do this without raycasting.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #8 on: March 24, 2017, 01:56:26 AM »
Hi,

ah yes, I am getting this too, crap... let me fix this.


 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #9 on: March 24, 2017, 02:14:14 AM »
Hi,

 can you try now, I think I fixed it ( never mess with editing a folder name and change just the capitalization, Unity doesn't detect the change very well... odd)


 Bye,

 Jean

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: are Raycasts in fixed update by default?
« Reply #10 on: March 25, 2017, 05:15:41 PM »
works a lot better, thanks a lot for this. still some jitter but its not being caused by the raycast.

http://www.webm.land/w/KwHY/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: are Raycasts in fixed update by default?
« Reply #11 on: March 28, 2017, 02:06:56 AM »
Hi,

 I did not spot the jitter in your video, but indeed all actions related to camera movement must be done on late update, so if some actions are not executing on late update, check for the same action + "Advanced" on the Ecosystem, they allow choosing when to execute the action.

 Bye,

 Jean