Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Fleech on March 18, 2017, 04:11:44 PM

Title: are Raycasts in fixed update by default?
Post by: Fleech 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.
Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre 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
Title: Re: are Raycasts in fixed update by default?
Post by: Fleech 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.
Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre on March 21, 2017, 02:57:08 AM
Hi,

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

(http://i.imgur.com/CPg98J7.png)

 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
Title: Re: are Raycasts in fixed update by default?
Post by: Fleech 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.

Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre 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
Title: Re: are Raycasts in fixed update by default?
Post by: Fleech on March 22, 2017, 05:49:36 PM
ok ill check it out today, thanks a lot for this.
Title: Re: are Raycasts in fixed update by default?
Post by: Fleech 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.
Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre on March 24, 2017, 01:56:26 AM
Hi,

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


 Bye,

 Jean
Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre 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
Title: Re: are Raycasts in fixed update by default?
Post by: Fleech 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/ (http://www.webm.land/w/KwHY/)
Title: Re: are Raycasts in fixed update by default?
Post by: jeanfabre 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