# Search Results

1. Post

### Snap/round 3D direction vector based on angle

So, I've finally gotten around to set up a test for this. My initial suggestion for the cube case was just broken. But the error was not really in...
Post by: Cannist, Jun 10, 2020 in forum: Scripting
2. Post

### Snap/round 3D direction vector based on angle

I am not sure if you'll get anywhere with this generalized problem. The requirement of fixing the angle on all of the three axes in general won't...
Post by: Cannist, Jun 10, 2020 in forum: Scripting
3. Post

### (Help) How To Rotate Object Based Off The Orientation Of The Main Camera

You probably want something along the lines oftransform.RotateAround(transform.position, Camera.main.forward, 3f);Although there is a chance that...
Post by: Cannist, Jun 9, 2020 in forum: Scripting
4. Post

### Snap/round 3D direction vector based on angle

I'm intrigued. What are those changes? I thought my solution was exactly what you were asking for, so where did I misunderstand you? I think I...
Post by: Cannist, Jun 9, 2020 in forum: Scripting
5. Post

### Help Wanted Endless runner - How to get jump air time to stay consistent as speed increases

If you don't have too many other time-dependent things you might be able to get away with just increasing the game speed instead of the running...
Post by: Cannist, Jun 8, 2020 in forum: Scripting
6. Post

### Make a boss dash past the player's position, then move the other way dropping projectiles...

Indeed, which is why I suggest the "And". All your booleans are negated in the disjunction. So as soon as one of the booleans is false, the whole...
Post by: Cannist, Jun 7, 2020 in forum: Scripting
7. Post

### Make a boss dash past the player's position, then move the other way dropping projectiles...

if (!dash || !bladeDrop || !chosenDirection) Should those || be &&?
Post by: Cannist, Jun 7, 2020 in forum: Scripting
8. Post

### Snap/round 3D direction vector based on angle

How about this: float MyRound(float f) { if (Mathf.Abs(f) < Mathf.Cos(Mathf.PI / 8)) return 0; else return Mathf.Sign(f); }...
Post by: Cannist, Jun 6, 2020 in forum: Scripting
9. Post

### [Solved] C# Script for multiple UI Sliders, allow decrease only, if max has reached

Well, I got curious as well about the decrease proportional to the value instead of (value - minValue) and here is my take on it: public void...
Post by: Cannist, Jun 1, 2020 in forum: Scripting
10. Post

### [Solved] C# Script for multiple UI Sliders, allow decrease only, if max has reached

You're welcome. :-) I think there is still an issue with your new version if the min values are not all 0. In line 102 you check if adjustment is...
Post by: Cannist, Jun 1, 2020 in forum: Scripting
11. Post

### [Solved] C# Script for multiple UI Sliders, allow decrease only, if max has reached

In the spirit of peer-review, might I suggest two improvements to the code, @Kurt-Dekker ? 1) This is a minor thing. You could avoid the inner...
Post by: Cannist, May 31, 2020 in forum: Scripting
12. Post

### SerializedField float in inspector automatically rounds (Solved)

I think I'd just use an int to represent a fixed point longitude/latitude value with 6 decimals accuracy, so 48.37201 would be stored as...
Post by: Cannist, May 29, 2020 in forum: Scripting
13. Post

### Trying to add Quaternion by having issues

You have not said what it is you want, but the rotation you end up with for the object you moved the handle on is: transformRotation *...
Post by: Cannist, May 28, 2020 in forum: Scripting
14. Post

### How to undo rotation and flip from Cubemap.getPixel

It looks to me only horizontally flipped, not additionally rotated. From the documentation it looks like Cubemap lays out its pixel rows top to...
Post by: Cannist, May 27, 2020 in forum: Scripting
15. Post

### Resolved Calculate angle between 2 points based on mouse input and update plane rotation accordingly

I have to admit I am constantly confused about what axis you want to rotate around and how your plane is lying in its local space. In your initial...
Post by: Cannist, May 27, 2020 in forum: Scripting
16. Post

### A* plugin generates empty paths when asked to route to the cursor location. Help!

destination = Input.mousePosition; Wouldn't you usually have to convert these screen coordinates to a world position that is actually on the ground?
Post by: Cannist, May 26, 2020 in forum: Scripting
17. Post

### Correct syntax to access child class from parent class?

The way this is typically solved in object oriented programming is to introduce a special empty method in the parent that can be overriden in the...
Post by: Cannist, May 25, 2020 in forum: Scripting
unityunity