Quantcast
Channel: Questions in topic: "raycast"
Browsing all 5161 articles
Browse latest View live

Convert c# to Js?

Hello, I have this C# script. Can someone translate it to Js? I'm afraid I can't do it myself :( // calculate desired camera position Vector3 position = target.position - (rotation * Vector3.forward *...

View Article


Soft first person interaction with rigidbodys.

I have an interaction script on my first person controller. The script sends out an Raycast to detect objects that are interactable. If the object can be picked up and held in front of the player it...

View Article


Accessing colliders, in if statement

Hello! Just to be clear i am using **Javascript**. I have been working on trying to detect if my mouse has clicked on a specific collider if it is clicked on that specific collider. heres my code: var...

View Article

Problem in Shooting Accuracy

Hello everyone i got Problem in Shooting Accuracy using Raycast Here is The Script : var hit: RaycastHit; if (Physics.Raycast(SpawnPoint.position, SpawnPoint.forward, hit)){ var delay = hit.distance /...

View Article

Stop player movement if it's Raycast hits an object

I have the debug for my raycasting, and it all seems to work as intended. Now all I need is for the Player to stop moving forward if the Raycast hits another object. Can I get examples or links to the...

View Article


Cubecasting?

Is there any way to raycast a cube? I know you can raycast spheres and capsules, but is there a way to do cubescasts?

View Article

check release mouse with raycast

How can I check if a Raycast has already hit an object? What I want to do is that when I click on a sphere is increased the strength to launch (to simulate a shot at the basket) but I can click only 1...

View Article

EteeskiTutorials' bullets (raycast bullets with gravity)

Hi, for my game I used EteeskiTutorial's bullets from one of his series ( http://www.youtube.com/watch?v=kx7PcUzhG_8&list=PLfAMZpOjTmpbr9EN9FwK76Hdr_bWMDxdH ), I only used the tutorial [1/5] though...

View Article


Why do my bullets only destroy themselves sometimes after colliding with the...

if (Physics.Raycast(myTransform.position, myTransform.up, out hit, range) && expended == false) { //if the collider has the tag of Floor then... if (hit.transform.tag == "Wall") { expended =...

View Article


GUI.button and onClick Terrain

I'm developing a 2D "Shoot'em up" game where my main character is stationary on the left of the screen and shoots where ever I click on the screen(using raycast). I have a pause button on the bottom...

View Article

Want to find the point straight below the controller

Hello, In the following code I have assigned the target to be the FirstPersonController, and that much appears to work (the distance to ground thing works okay). However, I want the magenta line to...

View Article

Help destroying gameObject on RayCastHit?

Hey all, This is my first time using raycasts and I'm a total noob at it. I'm sorry for rookiness, but please try to be patient as I've been trying to figure this out forever now. Haha! So here is what...

View Article

How expensive is Overlapsphere than a few raycastings?

Hi All, That's the basic question, But if anyone has teh inclination to read teh background.. here it is.. My starting point is the 3rd person controller from 3dbuzz tutorials, with a lot of my own...

View Article


How can I get a character to patrol and follow terrain?

I've seen many forum posts and answers related to parts of this question, but I can't seem to get it to work together properly. I have a character that I want to patrol waypoints and follow the terrain...

View Article

What does physics casting actually do?

I have been messing around with different aspects of physics casting mainly sphere. My original understanding of it was that it castes a sphere from an origin using that origin as a center of a sphere....

View Article


Raycast direction problem

Hi! I am trying to get mye raycast to change its direction. Vector 3 direction = transform.forward; direction.x += (Random.value - 0.5f) * spread; direction.y += (Random.value - 0.5f) * spread;...

View Article

Raycast firerate shooting

i have a raycast that shoots too fast i need to incorporate a firerate into it. i am a noob and i have spent an hour trying to fuse them together. if anyone could fuse them and help me out i would...

View Article


Help Playing "Sound Clip" on RayCastHit? (RayCast help?)

Hello, I am currently learning how RayCasting works and I need some help/example scripts. (I use Java.) Basically, I am using this script below to create a "RayCast" in front of my player. I am trying...

View Article

AI avoidnace Enum + Raycast, casters not working on some states

Hey guys. Started to play with Enum to set the state of my AI and keep my code readable - but I'm having a few problems. I have a slight idea as to way, but wanted some input from some gurus. I'll try...

View Article

Unity Android Movement Problem

Hi. This is a my script: var player : Transform; var point : Transform; function Update () { if (Input.GetButtonDown ("Fire1")) { var ray = Camera.main.ScreenPointToRay (Input.mousePosition); var hit :...

View Article
Browsing all 5161 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>