[Plugin] jcw_trace (raycast)

Post your work in progress addons and get feedback

Post » Wed Aug 24, 2016 3:08 am

Mirlas wrote:Hello, I do not know if this bug has been reported but I'll do it now.
I guess it's a bug in the plugin.
Any clue of the problem?

Image

By the way, thanks for the plugin !.


Well, the error isn't in English, but I still see a line number. It appears to have an issue with a variable being passed to Math.sign(). The number is derived only from the start and end positions of the trace, so make sure that you aren't making those invalid somehow. Some expressions (like the parameters in the function plugin) can return both numbers and strings. Perhaps you are accidentally passing a string to something that requires a number?
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Thu Aug 25, 2016 3:57 pm

Johncw87 wrote:
Mirlas wrote:Hello, I do not know if this bug has been reported but I'll do it now.
I guess it's a bug in the plugin.
Any clue of the problem?

Image

By the way, thanks for the plugin !.


Well, the error isn't in English, but I still see a line number. It appears to have an issue with a variable being passed to Math.sign(). The number is derived only from the start and end positions of the trace, so make sure that you aren't making those invalid somehow. Some expressions (like the parameters in the function plugin) can return both numbers and strings. Perhaps you are accidentally passing a string to something that requires a number?



I'm almost sure that the parameters sent to the function are numbers.

Image

I found that the error only occurs in Internet Explorer 11.
In Chrome it works well.
B
31
S
13
G
21
Posts: 844
Reputation: 14,693

Post » Sat Aug 27, 2016 5:26 am

Mirlas wrote:I found that the error only occurs in Internet Explorer 11.
In Chrome it works well.


That... actually helps. I re-created the error, and now see it in English.
Javascript error!
Object doesn't support property or method 'sign'


Apparently Internet Explorer doesn't support Math.sign(). At all. This is the kind of thing that makes web developers hate IE.

This is from MSDN:
Supported in Microsoft Edge (Edge browser). Also supported in Store apps (Microsoft Edge on Windows 10). See Version Information.

Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.1.


I'm not really sure what I'm gonna do about that. I'm leaning heavily towards "screw Microsoft and their non-standards-compliant browser".
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sat Aug 27, 2016 7:58 pm

It is not connected with the plugin, but for the ray I get this:
Image
The ray goes in both directions from the center. The second point is mouse.
I can't understand what is wrong.
B
20
S
4
Posts: 51
Reputation: 1,104

Post » Sat Aug 27, 2016 8:34 pm

Sorry - I have found the mistake - it was imagepoint.
B
20
S
4
Posts: 51
Reputation: 1,104

Post » Sun Aug 28, 2016 8:46 pm

Is it possible to determine the first hit? I need to add special visualization for the first hit.
B
20
S
4
Posts: 51
Reputation: 1,104

Post » Mon Aug 29, 2016 12:18 am

bangoo wrote:Is it possible to determine the first hit? I need to add special visualization for the first hit.


Not sure what you mean? The HitX and HitY are the first hit. It ignores anything that isn't the first hit.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sat Sep 17, 2016 5:00 am

This is a great plugin, thank you for making it. However, it appears that it requires the solid behavior to function - I don't suppose it's possible to make it bounce off an object without that?
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Sat Sep 17, 2016 6:23 am

@Arima, you can set Custom obstacles in the properties list and then add objects to trigger hit returns on start of layout. This really is a magic plugin...
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,285
Reputation: 47,554

Post » Sun Sep 18, 2016 7:45 am

Ah, totally missed that. Thanks, @Colludium. :)
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests