# Search Results

1. Post

### Official Improving iteration time on C# script changes

In case anyone in this thread misses it. The 2022 beta supposedly improves iteration times....
Post by: ubbelito, Dec 13, 2021 in forum: Scripting
2. Post

It sounds like you want to inverse transform the walking direction....
Post by: ubbelito, Dec 8, 2021 in forum: Scripting
3. Post

### Question What is the most efficient way to keep a vertex contained within a network of edges/vertices?

The problem formulation is made for 2d problems, such as the mesh surface in your example, so I will assume 2d for this. If you want to define the...
Post by: ubbelito, Nov 15, 2021 in forum: Scripting
4. Post

### Question How do I get a range of vertices/edges using a half-edge data structure?

I get the feeling, having read through this thread properly, that topological distance (if that is a word) may not be what you are looking for....
Post by: ubbelito, Nov 14, 2021 in forum: Scripting
5. Post

### Question How do I get a range of vertices/edges using a half-edge data structure?

The standard solution to a problem like this is to apply Djikstras algorith. https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm This algorithm...
Post by: ubbelito, Nov 14, 2021 in forum: Scripting
6. Post

### How to make Player rotate relative to the Camera

Something like this? It seems that you are already rotating the camera, as you said that the camera is properly aligned. So I just copied the...
Post by: ubbelito, Nov 9, 2021 in forum: Scripting
7. Post

### Getting some imprecision after calculations involving Vector2, while trying to find a line's pixels

Could something like this work? Vector2 relative = new Vector2 (pointB.x - pointA.x, pointB.y - pointA.y); float steps =...
Post by: ubbelito, Nov 7, 2021 in forum: Scripting
8. Post

### Casting A ray from one specific object that is somewhere in game(probably not at origin) to another

This function seems to be what you want to do. https://docs.unity3d.com/ScriptReference/Transform.LookAt.html It seems that the example in the...
Post by: ubbelito, Nov 5, 2021 in forum: Scripting
9. Post

### Question How to make this kind of parabolic arc movement?

You are quite right. "targetVector" must be based on the original firing position and the target (velocity and position). Sorry about that. It...
Post by: ubbelito, Nov 4, 2021 in forum: Scripting
10. Post

### Official Improving iteration time on C# script changes

I am not suggesting they don't take user feedback seriously. I am also not suggesting that they don't open the editor during development to test...
Post by: ubbelito, Nov 4, 2021 in forum: Scripting
11. Post

### Official Improving iteration time on C# script changes

Isn't the underlying problem here that no one at Unity use the editor themselves? Even on toy projects, it is immediately obvious how painful the...
Post by: ubbelito, Nov 3, 2021 in forum: Scripting
12. Post

### Question How to make this kind of parabolic arc movement?

Below uses bold for vectors and non-bold for scalars. I may have made a mistake somewhere, but it's an outline for a solution. So assuming that...
Post by: ubbelito, Nov 3, 2021 in forum: Scripting
13. Post

### Tough rotations problem. Not really sure where to even start.

One obvious issue with the solution is that bullets fired by a stationary player will have drift = 0, so the player can then start running and...
Post by: ubbelito, Oct 31, 2021 in forum: Scripting
14. Post

### Tough rotations problem. Not really sure where to even start.

I think you want to assign drift as drift = Vector3.Project(playerRigidbody.velocity, playerCamera.transform.forward); if...
Post by: ubbelito, Oct 31, 2021 in forum: Scripting
15. Post

### player prefs using toggles

I would use ”muted” as the only option. That seems easiest.
Post by: ubbelito, Oct 31, 2021 in forum: Scripting
16. Post

### Question check if raycast hitted object is a certain tag and then do something

Yes but "CompareTag" seems like a more Unity way of doing things. Thanks!
Post by: ubbelito, Oct 31, 2021 in forum: Scripting
17. Post

### Question check if raycast hitted object is a certain tag and then do something

if (hit && hitInfo.collider.gameObject.tag == "my_tag") should do the trick. You can check any number of other conditions as well. This is very...
Post by: ubbelito, Oct 31, 2021 in forum: Scripting
unityunity