Remember me
You are here: HomeForumCyberix3D ForumReport a bugno words in editor
Welcome, Guest
Username: Password: Remember me

TOPIC: Add Ray Cast (command)

Add Ray Cast (command) 3 years 10 months ago #1933

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
Can someone explain to me exactly what the add ray cast command is for and how it works?
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1935

If memory serves my right, I think it is related to a line cast like in Unreal Engine 4.

It just shoots a line from one place to another
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1936

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
can you give me an example project? I am trying to change the color of the camera when it looks at the cube to see if it is inside the raycast and if it is not watching it change color
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1938

I've never used it so I wouldn't know how to use it, I'm sure that raycasts are already used in the base FPS Project
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1939

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
The ray cast is perfect to include in my new AI to detect the character but I don't know how to use it because it tries and it doesn't work, I hope that cyberix3d ​​can give us an example of how to use it
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1940

It is possible that you are using the raycast correctly, there are times where I've experimented with coding and it never works, and then I see a member on Cyberix actually come up with the same code and they publish it working.

It could be that the Cyberix engine is glitched depending on the user, or that I'm using Firefox.
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1941

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
Hello,
With ray cast, you can test if a ray is hit with a far object.
Here is an example:
www.gamemaker3d.com/player?pid=01652049
raycast.png

There are few bugs with the ray cast but there are also workarounds.
If you encounter any problem using the ray cast you can ask here.
Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Symbiotic Interactives, GODEBEX

Add Ray Cast (command) 3 years 10 months ago #1942

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
hello I think I found an error, if the raycast command is not in the editor it will continue to work, and if I put the remove to rays command, it still works
Last Edit: 3 years 10 months ago by GODEBEX.
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1943

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
Hello I have a problem with the positions of the raycast, you set the parameter "to x" to 500 I changed it to "0" and set the parameter to "z" to 500 to change it position and it seems that 2 rays were created and the previous one that was in the position of 500 is still there but leaves it at "0"

link example:

www.gamemaker3d.com/player?pid=054616152088

change "a x" to 0 and "a z" to 500

to summarize the rays doubled but I'm only using one
Last Edit: 3 years 10 months ago by GODEBEX.
The administrator has disabled public write access.

Add Ray Cast (command) 3 years 10 months ago #1944

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
hello I just realized something.
if for example we create a ray with the position "x" to 500 and run the game and go back to the editor but we change the parameter "x" to 0 and "z" to 500 and run the game again the rays are doubled, I mean that the "x" that was in 500 is still active.
but the error is corrected only when we exit the cyberix3d editor and re-enter.

that's why in the error example I posted yesterday you don't notice the error, but if you follow my steps mentioned above you will see the error, I hope you can correct it
Last Edit: 3 years 10 months ago by GODEBEX.
The administrator has disabled public write access.
Time to create page: 0.565 seconds