« first day (3859 days earlier)      last day (1458 days later) » 

00:19
Crammed a lot into that comment...
There are two common patterns for this: 1) public SomeStruct? GetSomeStruct() using the nullable struct type. The caller checks whether the returned value is non-null (or its .HasValue member), before accessing the struct in the .Value member. 2) public bool TryGetSomeStruct(out SomeStruct value). Then the caller says if (TryGetSomeStruct(out SomeStruct value) ) { /* use value */ }. But this is general C# programming, not specific to game development, so it's something you should ask on StackOverflow. — DMGregory ♦ 6 mins ago
Dang, I'm stuck in Unity right now. I want to make my game's follow-camera switch to the follow-camera that views from the front, when driving, so that when going reverse, the camera switches so that you can see where you're going.
Problem is, I can't figure out how to detect when I'm actually going backwards.
Because it switches whenever I press the S or DownArrow Key.
Did you try checking the dot product of your velocity versus the camera's forward vector?
But then when I use S or the DownArrow Key to slow down, it switches.
No.
It'll be positive if you're driving "into" the screen, and negative if you're driving "out of" the screen toward the player.
What?
Oh, I see
But that happens when I slow down, too. To a certain extent.
I need to figure out how to tell exactly when the car is going backwards.
and not just when I tell it to go backwards.
Because I use the same key to slow as the Key I use to go backwards.
00:23
As long as you're continuing to drive forward, it should not go negative. You can flatten the forward vector into the ground plane to avoid glitches due to the downward camera angle.
I had something happen like that before, but with a different script in a different project.
The problem is that the camera switches too early.
Then you add a threshold.
It switches the minute I press "S", and not when the car actually starts going backwards.
Because "S" slows the car down.
And then if I keep slowing down, I go backwards.
It sounds like you're checking your input or acceleration vector, not the car's net velocity.
No, I'm checking when I press the S key.
And I don't want to do that.
00:26
Right, so don't do that. Do the thing I suggested instead.
A threshold.
...?
The dot product of the velocity and camera forward direction.
But that'd detect when it goes off screen. If I am going 300 mph and hit the hand brake, that's also going to happen because I'm slowing down faster than the Camera is following it.
No, that is not how dot products work.
No no, I mean you said the value is negative if it's "out of screen"
or going "out of screen"
well, handbrake @ 300mph = doom
00:29
No, I said it will go negative if you are travelling in the direction that points outward from the screen.
where doom = Car is also appears to be going off screen
Again, no, you are misunderstanding.
Oh wait you're basically saying that it's not whether it appears, it's whether it physically is moving that direction.
What we are checking has nothing to do with the car's position on or off the screen.
We are only referring to the car's direction of travel within the world.
Yes.
Direction of travel.
Exactly.
Backwards = reverse-cam(+1 different camera option), forwards = normal-cam (+8 different camera options)
And I'm to use a dot product of my car's velocity versus my camera's forward vector?
Oh, yes I see now. You said "screen" only because "screen" comes from camera, and we're using the camera's forward vector versus a dot product of the car's velocity.
Something like that.
00:35
Sounds like you're on a good track.
yay
Oh yes, I see now. Dot can check if a transform is behind another transform.
Rather, it checks whether two vectors are pointing in the same direction or opposite directions.
8
Q: How do I interpret the dot product of non-normalized vectors?

JesseTGI know that if you take the dot-product of two normalized vectors, you get the cosine of the angle between them. But if I take the dot-product of two non-normalized vectors (or one normalized, one not), how can I interpret the resulting scalar?

Yeah... wait, would it be useful to say that my camera never ends up not seeing the car?
That is not guaranteed by this method out of the box, but we can make that happen if you need it.
Right.
Okay. So, I think I have a good understanding of dot, but how would I do this "Compare dot product of car velocity versus camera's forward vector"? Probably my most-occurring compiler error is "Cannot implicitly convert type "something" and "something"" where "something" is like a bool or Vector3 or something, because I get lost with my other variables sometimes.
Like, I've seen operands in scripts that look like these: "&&||", "|?|" and "%&"
And that confuses me.
00:47
You might want something like if (Vector3.Dot(cameraForwardDirection, carVelocity) < threshold) { /*...reverse camera...*/ }
Where cameraForwardDirection is the current direction of the camera?
Or...
Is it whether the camera is facing forwards relative to the vehicle?
Vector3 cameraForwardDirection = Camera.main.transform.forward; is a good start.
If you have a very inclined camera, then cameraForwardDirection.y = 0 might be worthwhile too.
Ah, wait. What is threshold?
I get nothing searching it up.
It's a name for a cut-off value that you choose. You might set it to -0.1 for example, to be slightly less than zero, so you don't flicker back and forth when the velocity is barely backwards.
01:04
Oop, it does it whenever I press the S key.
@Vaillancourt i don't want you to help me make it i want you to show me a way or maybe a tutorial you once saw that might help me make what i want, and i want to use this for an opengl game — MaxCE 2 hours ago
It seems to me that DMGregory already gave them the how-to?
A "model format", like any file format, is just a convention for how you've decided to write down the data you care about as text or bytes. So, your first step is to identify what data you care about. Step two is to decide how you want to express that data as text or bytes. Step three is to write a parser, that reads text/bytes in the arrangement you chose, and converts it to your game's in-memory representation of the model. Which one step of this process do you need help with? — DMGregory ♦ 6 hours ago
I think they're just a bit too inexperienced to even identify what they need yet. 😓
@Wasabi Sounds like you're comparing the wrong vectors, or using the wrong threshold.
threshold = -0.1;
Vector3 cameraForwardDirection = camera.transform.forward;
if (Vector3.Dot(cameraForwardDirection, chassiRigid.velocity) < threshold)
That is what I did
Based on what you had said.
@DMGregory Yes, I think so too.
*Taught
01:14
Looks like you can use a threshold further into the negatives.
?
I've interpreted that in too many ways: "That My threshold goes further", "That my threshold should be made to go further", "That you now know that my threshold has the ability to go further", "That the way I used it, it appears that my threshold could go further" and a few more.
My assumption is that I should put my threshold as -0.1 or less
but => operands cannot be used the way I did.
Does "patchacked" sounds like "patched/hacked"?
Well,
"Patchacked" using the "h" twice like in "threshold" would, yes.
@DMGregory lol, I just figured out that the thing is working, but in reverse.
Meaning, it does it for the reverse camera and not the forward camera.
01:30
@Wasabi I'm not sure I understand what you mean.
I wanted to make my camera switch to a reverse camera when my car goes in reverse.
Previously, it woould switch when I hit the S key, which caused it to change not only when going backwards, but also when I slow down, and it changes back to normal the instant I let go of the key.
So, I wanted to switch when the car goes backwards.
But instead, it switches the instant I press the S key, like before, but when going reverse, It waits to switch back to normal until I'm actually going forwards. Which is what I wanted for the Forward camera, not the Reverse camera.
But, I'll take it.
As long as I can get it to work for the forward camera, too.
Oh I was referring to the comparison of patchacked and threshold..
I got it to work!
Because Patchacked without a double h would be "Patch-ack'd" but in the old English pronunciation of "Threshold", which was "Thresh-Hold" because it originated from "Thrush-Hold" which was originally a hold for a Thrush, which is a type of bird. So, a double-h would be "Patch-Hacked". See, when splitting it, the double H is turned into an "H" at both the end of the first product of the split, and at the beginning of the second product of the split.
If it weren't a double-H, then the split would leave you with an H at the end of the first product, and no H at the beginning of the second product.
@Wasabi Both of the internet sources I've read about threshold don't mention this...
02:13
@DMGregory Sorry for bothering, but what exactly is z-sexual? Is it like bisexual?
Did you read the messages immediately after that one?
No, not really.
Oh I see, never mind. Sorry for bothering.
 
13 hours later…
user92578
16:14
Debugging some mystical render target issues, I push a clear op for the target first, and then some render commands, and somehow the clear and rendering go to different target handles
😲
user92578
16:46
Yeah damn the render target resolving in RenderDoc doesn't seem even close to what I see in my debugger
That's bizarre!
17:08
hey, Deep Rock Galactic is free to play this weekend, is on sale, and turns out to be really fun!
17:22
Oooh, cool!
@Almo What store is it on?
steam
 
2 hours later…
19:09
^ Also on the MS store here.
Although not on sale or free to try there.
 
1 hour later…
20:33
@Almo it reminds me of this game: youtube.com/watch?v=TURNiAoOhxA
very similar
@Almo and there is another game. I can not find its name. but basically it is very similar to the Deep Rock Galactic. in that game there r also a few classes, but instead of the space the action takes place in forest and u play for orcs. it was released maybe 5-10 years ago
@Almo they put so much content into a game. I wonder how much time and efforts did it take: youtube.com/watch?v=rGLiraeV27k
found their web page: ghostship.dk/about.html
user92578
21:04
Okay so FWIW, I found the render target issue, each "view", basically a pass in BGFX, can only have one render target bound, but I was reusing a worker pass for different targets
user92578
Ended up implementing swapping view IDs behind the scenes when the target changes, but need to consider if I can come up with a better approach for random worker renderings to a target
21:23
no need to ping me three times
22:10
@Almo I know what you mean. He pinged me 5 times yesterday in 1 minute. He's new here.
Hey all
Hey. How are you doing today?
I'm okay.
@DMGregory I had never heard z-sexual before. Clever name. I always heard the term allosexual
That's good. I'm just playing Almo's Cognizer game.
Nice
I was playing a little Factorio. But now I have to avoid doing work by chatting with yall because all my teammates left.
22:16
What's Factorio?
A game
one sec
Satisfactory seems a little bit like that game, except 3D.
Probably inspired by Factorio
Well, I guess there are other games like it too.
Hey, @Pikalek!
Just chopped (another) 2 lbs of green onions. My eyeballs a spheres of regret and torment.
22:22
Why so many?
Maybe he's cooking a stew?
One of my wife's clinics teamed up w/ a food pantry. They got a big shipment of produce that was too iffy to offer. She brought some of it home & 90% went into my compost bins. But I thought - hey I can totes save these bags of green onions.
So I'm chopping & dehydrating them.
Nice
I need a dehydrator. That sounds useful to have.
We got our first one from a thrift store for five or ten bucks. Used it a ton.
Enough so that I was willing to level up to a more pro model later on.
My wife will probably not like the idea of yet another kitchen tool. I need to think of a clever way to convince her to let me get it.
22:32
I can appreciate her stance - I'm pretty selective about adding tools to the kitchen.
We are pretty much out of space.
Is the main issue
I am selective. Just apparently not selective enough.
And/or your space doesn't meet your needs/wants.
Both.
And my kitchen is by no means small.
ohh speaking of. The grill is ready. Off to cook some burgers!
I wish you good skill & great taste!
@OKprogrammer What are you working on currently w/ your game?
22:54
Sorry for the late response, just fixing the inventory UI.
No worries. I have to bail out though to go fetch things to eat that aren't onions. Good luck w/ your UI!

« first day (3859 days earlier)      last day (1458 days later) »