What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 13:50:18
godot raycast2d doesn't exclude parent
raycast.add_exception(object) Add solution -
Other 2022-03-27 12:00:11
unity make raycast ignore object
Transform targetTransform = null; // target assigned in inspector RaycastHit[] hits; // returned hits LayerMask mask = new LayerMask(); // set in inspector - USE LAYER MASK TO FILTER hits = Physics.RaycastAll(transform.position, transform.forward, ma... Add solution -
Other 2022-03-16 22:00:02
unity get gameobject from hit
RaycastHit.transform.gameObject Add solution -
C# 2022-03-16 13:35:27
The type or namespace name 'Target' could not be found (are you missing a using directive or an assembly reference?)
} public float damage = 100f; // Update is called once per frame void Update () { if (Input.GetButtonDown("Fire1")) { shoot(); } } void shoot() { RaycastHit hit; if (Physics.Raycast(transform.position,transform.forwa... Add solution -
Lua 2022-02-03 22:50:13
lua raycasting
EXPAND local function fireLaser() -- Set an origin and directional vector local rayOrigin = caster.Position local rayDirection = Vector3.new(0, -100, 0) -- Build a "RaycastParams" object and cast the ray local raycastParams = RaycastPara... Add solution