Remember me
You are here: HomeForumCyberix3D ForumGeneral DiscussionAdd Ray Cast (command)
Welcome, Guest
Username: Password: Remember me

TOPIC: Add Ray Cast (command)

Add Ray Cast (command) 3 weeks 3 days ago #1933

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 3 days ago #1935

  • Symbiotic Interactives
  • Symbiotic Interactives's Avatar
  • OFFLINE
  • Gold Boarder
  • Hello, World! We are Symbiotic Interactives, we are a team of developers who love expressing our creativity in Video Games. We love to make people happy and have fun. have fun in our world :)
  • Posts: 190
  • Thank you received: 44
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
Symbiotic Interactives, Have Fun In Our World :)
The administrator has disabled public write access.

Add Ray Cast (command) 3 weeks 3 days ago #1936

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 3 days ago #1938

  • Symbiotic Interactives
  • Symbiotic Interactives's Avatar
  • OFFLINE
  • Gold Boarder
  • Hello, World! We are Symbiotic Interactives, we are a team of developers who love expressing our creativity in Video Games. We love to make people happy and have fun. have fun in our world :)
  • Posts: 190
  • Thank you received: 44
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
Symbiotic Interactives, Have Fun In Our World :)
The administrator has disabled public write access.

Add Ray Cast (command) 3 weeks 2 days ago #1939

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 2 days ago #1940

  • Symbiotic Interactives
  • Symbiotic Interactives's Avatar
  • OFFLINE
  • Gold Boarder
  • Hello, World! We are Symbiotic Interactives, we are a team of developers who love expressing our creativity in Video Games. We love to make people happy and have fun. have fun in our world :)
  • Posts: 190
  • Thank you received: 44
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.
Symbiotic Interactives, Have Fun In Our World :)
The administrator has disabled public write access.

Add Ray Cast (command) 3 weeks 1 day ago #1941

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 451
  • Thank you received: 426
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 weeks 1 day ago #1942

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 1 day ago by GODEBEX.
The administrator has disabled public write access.

Add Ray Cast (command) 3 weeks 19 hours ago #1943

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 19 hours ago by GODEBEX.
The administrator has disabled public write access.

Add Ray Cast (command) 3 weeks 3 hours ago #1944

  • GODEBEX
  • GODEBEX's Avatar
  • NOW ONLINE
  • Expert Boarder
  • Posts: 87
  • Thank you received: 23
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 weeks 3 hours ago by GODEBEX.
The administrator has disabled public write access.
Time to create page: 0.090 seconds